public class TriangularPrism extends Model
See https://en.wikipedia.org/wiki/Triangular_prism
See https://en.wikipedia.org/wiki/Prism_(geometry)
Attach to each triangular end of the prism a tetrahedron.
hidden, lineSegmentList
Constructor and Description |
---|
TriangularPrism()
Create a right equilateral triangular prism with a
regular tetrahedrons attached to each end so that
the total length runs from -1 to 1 along the y-axis.
|
TriangularPrism(double s,
double h)
Create an equilateral triangular prism that runs
from
-h to h along the y-axis, has
triangle side length s , and has a regular
tetrahedron attached to each end. |
TriangularPrism(double r,
double h,
double theta,
int n)
Create an equilateral triangular prism that runs
from
-h to h along the y-axis, with
the triangle inscribed in a circle of radius r ,
has a tetrahedron attached to each end where the
face-edge-face angle of each tetrahedron is theta
(with theta in radians!), and has n lines of
latitude around the body of the prism. |
TriangularPrism(double r,
double h,
double h2,
int n,
boolean bothHalves)
Create an equilateral triangular prism that runs
from
-h to h along the y-axis, with
the triangle inscribed in a circle of radius r ,
has a tetrahedron attached to each end where the height
of each tetrahedron is h2 , and has n lines
of latitude around the body of the prism. |
TriangularPrism(double s,
double h,
int n)
Create an equilateral triangular prism that runs
from
-h to h along the y-axis, has
triangle side length s , has a regular
tetrahedron attached to each end, and has n
lines of latitude around the body of the prism. |
public TriangularPrism()
public TriangularPrism(double s, double h)
-h
to h
along the y-axis, has
triangle side length s
, and has a regular
tetrahedron attached to each end.s
- the length of the triangle's sidesh
- the body of the prism runs from -h to h along the y-axispublic TriangularPrism(double r, double h, double theta, int n)
-h
to h
along the y-axis, with
the triangle inscribed in a circle of radius r
,
has a tetrahedron attached to each end where the
face-edge-face angle of each tetrahedron is theta
(with theta in radians!), and has n
lines of
latitude around the body of the prism.
If theta = 0
, then there are no tetrahedrons at the ends of the prism.
If theta = arctan(sqrt(2)) = 54.736°
, then the tetrahedrons are regular.
r
- radius of circle in xz-plane that the equilateral triangle is inscribed inh
- the body of the prism runs from -h to h along the y-axistheta
- slant angle of each tetrahedron at the ends of the prismn
- number of lines of latitude around the body of the prismpublic TriangularPrism(double r, double h, double h2, int n, boolean bothHalves)
-h
to h
along the y-axis, with
the triangle inscribed in a circle of radius r
,
has a tetrahedron attached to each end where the height
of each tetrahedron is h2
, and has n
lines
of latitude around the body of the prism.
So the total height is 2*(h + h2)
.
r
- radius of circle in xz-plane that the equilateral triangle is inscribed inh
- the body of the prism runs from h to -h in the y-directionh2
- height of each tetrahedron at the ends of the prismn
- number of lines of latitude around the body of the prismbothHalves
- determines if both halves or only the top half gets createdpublic TriangularPrism(double s, double h, int n)
-h
to h
along the y-axis, has
triangle side length s
, has a regular
tetrahedron attached to each end, and has n
lines of latitude around the body of the prism.s
- the length of the triangle's sidesh
- the body of the prism runs from -h to h along the y-axisn
- number of lines of latitude around the body of the prism