Returns the net of the
Tetrahedron
, i.e., the two-dimensional pattern of triangles that can be folded into a model of a tetrahedron.1 The net lies in the x-z plane. The triangles have enclosing circles of diameter triangle_diameter. The center of the middle triangle is at the origin.vector<Reg_Polygon*> vrp = Tetrahedron::get_net(2); for (vector<Reg_Polygon*>::iterator iter = vrp.begin(); iter != vrp.end(); ++iter) { (**iter).draw(); }
![]()
Fig. 189.
This function is used in the non-default constructor. See Polyhedron Reference; Regular Platonic Polyhedra; Tetrahedron; Constructors and Setting Functions. The constructor starts with the net and rotates three of the triangles about the adjacent vertices of the middle triangle. Currently, all of the
Polyhedron
constructors work this way. However, this is not ideal, because rotation uses the sine and cosine functions, which cause inaccuracies to creep in. I think there must be a better way of constructingPolyhedra
, but I haven't found one yet.The
Polyhedron
constructors are also especially sensitive to changes made toTransform::align_with_axis()
. I have already had to rewrite them twice, and sinceTransform::align_with_axis()
may need to be changed or rewritten again, it's possible that thePolyhedron
constructors will have to be, too. It has also occurred in the past, that thePolyhedra
were constructed correctly on one platform, using a particular compiler, but not on another platform, using a different compiler.
true
])Draws the net for a
Tetrahedron
in the x-y plane. The triangles have enclosing circles of diameter triangle_diameter. The origin is used as the center of the middle triangle. The centers of the triangles are numbered. If the argument make_tabs is used, tabs for gluing and/or sewing a cardboard model of theTetrahedron
together will be drawn, too. The dots on the tabs mark where to stick the needle through, when sewing the model together (I've had good results with sewing).Tetrahedron::draw_net(3, true);
![]()
Fig. 190.
The net is drawn in the x-y plane, because it currently doesn't work to draw it in the x-z plane. I haven't gotten around to fixing this problem yet.