public class SphereSubdivided extends Model
Also use this subdivision process to draw Sierpinski triangles on the surface of the sphere.
lineSegmentList, vertexList, visible
Constructor and Description |
---|
SphereSubdivided()
Create a sphere centered at the origin by recursively
subdividing the faces of a tetrahedron four times.
|
SphereSubdivided(int n)
Create a sphere centered at the origin by recursively
subdividing the faces of a tetrahedron
n times. |
SphereSubdivided(int n,
boolean hole,
boolean sierpinski)
Create a sphere centered at the origin by recursively
subdividing the faces of a tetrahedron
n times. |
addLineSegment, addLineSegment, addVertex, setColor, setColorRandom, setRandomColors, setRandomLineSegmentColors, toString
public SphereSubdivided()
public SphereSubdivided(int n)
n
times.n
- number of recursive subdivisionspublic SphereSubdivided(int n, boolean hole, boolean sierpinski)
n
times.
The hole
parameter leaves out one of the original
four triangle faces of the tetrahedron. This creates a hole
in the final sphere that is useful for looking at the back
side of the sphere.
The sierpinski
parameter creates Sierpinski triangles
on the sphere.
n
- number of recursive subdivisionshole
- do not render one of the four triangles of the tetrahedronsierpinski
- create Sierpinski triangles