public class Ring extends Model
RingSector
lineSegmentList, vertexList, visible
Constructor and Description |
---|
Ring()
Create a ring (annulus) in the xy-plane with outer
radius 1 and with inner radius 0.33, with 12 spokes
coming out of the center, and with 5 concentric circles.
|
Ring(double r1,
double r2)
Create a ring (annulus) in the xy-plane with outer
radius
r1 and with inner radius r2 ,
with 12 spokes coming out of the center, and with
5 concentric circles. |
Ring(double r1,
double r2,
int n,
int k)
Create a ring (annulus) in the xy-plane with outer
radius
r1 and with inner radius r2 ,
with k spokes coming out of the center, and
with n concentric circles (not counting the
inner most circle). |
addLineSegment, addLineSegment, addVertex, setColor, setColorRandom, setRandomColors, setRandomLineSegmentColors, toString
public Ring()
public Ring(double r1, double r2)
r1
and with inner radius r2
,
with 12 spokes coming out of the center, and with
5 concentric circles.r1
- outer radius of the ringr2
- inner radius of the ringpublic Ring(double r1, double r2, int n, int k)
r1
and with inner radius r2
,
with k
spokes coming out of the center, and
with n
concentric circles (not counting the
inner most circle).
Notice that if there are k
spokes, then each circle
around the center will have k
line segments. If there
are n
concentric circles around the center (not counting
the inner most circle), then each spoke will have n
line
segments.
There must be at least three spokes and at least one concentric circle.
r1
- outer radius of the ringr2
- inner radius of the ringn
- number of concentric circlesk
- number of spokes in the ring