public class Cone extends ConeSector
See https://en.wikipedia.org/wiki/Cone
This model can also be used to create right k-sided polygonal pyramids.
ConeFrustum
hidden, lineSegmentList
Constructor and Description |
---|
Cone()
Create a right circular cone with its base in the xz-plane,
a base radius of 1, height 1, and apex on the positve y-axis.
|
Cone(double r,
double h)
Create a right circular cone with its base in the xz-plane,
a base radius of
r , height h , and apex on
the y-axis. |
Cone(double r,
double h1,
double h2,
int n,
int k)
Create a right circular cone with its base parallel to the xz-plane at
height
y = h1 , a base radius of r , and apex on the
y-axis at y = h2 . |
Cone(double r,
double h,
int n,
int k)
Create a right circular cone with its base in the xz-plane,
a base radius of
r , height h , and apex on
the y-axis. |
public Cone()
public Cone(double r, double h)
r
, height h
, and apex on
the y-axis.r
- radius of the base in the xz-planeh
- height of the apex on the y-axispublic Cone(double r, double h1, double h2, int n, int k)
y = h1
, a base radius of r
, and apex on the
y-axis at y = h2
.
The last two parameters determine the number of lines of longitude and the number of circles of latitude in the model.
Notice that if there are n
circles of latitude in the model
(including the bottom edge), then each line of longitude will have
n+1
line segments. If there are k
lines of longitude,
then each circle of latitude will have k
line segments.
There must be at least three lines of longitude and at least one circle of latitude.
By setting k
to be a small integer, this model can also
be used to create k-sided polygonal pyramids.
r
- radius of the base in the xz-planeh1
- height of the base on the y-axish2
- height of the apex on the y-axisn
- number of circles of latitude around the conek
- number lines of longitudepublic Cone(double r, double h, int n, int k)
r
, height h
, and apex on
the y-axis.
The last two parameters determine the number of lines of longitude and the number of circles of latitude in the model.
Notice that if there are n
circles of latitude in the model
(including the bottom edge), then each line of longitude will have
n+1
line segments. If there are k
lines of longitude,
then each circle of latitude will have k
line segments.
There must be at least three lines of longitude and at least one circle of latitude.
By setting k
to be a small integer, this model can also
be used to create k-sided polygonal pyramids.
r
- radius of the base in the xz-planeh
- height of the apex on the y-axisn
- number of circles of latitude around the conek
- number lines of longitude