public class Cube extends Model
(±1, ±1, ±1)
.
Here is a picture showing how the cube's eight vertices are labeled.
v[4]
+-----------------+ v[5]
/| /|
/ | / |
/ | / |
/ | / |
v[7] +-----------------+ v[6] |
| | | | y
| | | | |
| | | | |
| v[0] +---------|-------+ v[1] |
| / | / |
| / | / +----. x
| / | / /
|/ |/ /
+-----------------+ /
v[3] v[2] z
Tetrahedron
,
Octahedron
,
Icosahedron
,
Dodecahedron
lineSegmentList, vertexList, visible
Constructor and Description |
---|
Cube()
Create a cube with its center at the origin, having edge
length 2, and with its vertices at
(±1, ±1, ±1) . |
addLineSegment, addLineSegment, addVertex, setColor, setColorRandom, setRandomColors, setRandomLineSegmentColors, toString
public Cube()
(±1, ±1, ±1)
.