public class DiskSector extends Model
Disk
lineSegmentList, vertexList, visible
Constructor and Description |
---|
DiskSector()
Create half a disk in the xy-plane with radius 1,
with 7 spokes coming out of the center, and
with 6 concentric circles around the disk.
|
DiskSector(double r,
double theta1,
double theta2,
int n,
int k)
Create a sector of a disk in the xy-plane with radius
r , with k spokes coming out of the center,
and with n concentric circles around the disk. |
addLineSegment, addLineSegment, addVertex, setColor, setColorRandom, setRandomColors, setRandomLineSegmentColors, toString
public DiskSector()
public DiskSector(double r, double theta1, double theta2, int n, int k)
r
, with k
spokes coming out of the center,
and with n
concentric circles around the disk.
Notice that if there are k
spokes, then each (partial)
circle around the center will have k-1
line segments.
If there are n
concentric circles around the center,
then each spoke will have n
line segments.
There must be at least four spokes and at least one concentric circle.
r
- radius of the disktheta1
- beginning angle of the sectortheta2
- ending angle of the sectorn
- number of concentric circlesk
- number of spokes in the disk