#include <polymesh.hpp>
Inherits renderstack::shapes::polymesh.
Public Member Functions | |
dodecahedron (double r=1.0) |
Definition at line 107 of file polymesh.hpp.
renderstack::shapes::dodecahedron::dodecahedron | ( | double | r = 1.0 |
) |
Definition at line 1060 of file polymesh.cpp.
01061 { 01062 double a = 2.0 / (sq3 + sq3 * sq5); 01063 double b = 1.0 / (3.0 * a); 01064 01065 push_point( r / sq3, r / sq3, r / sq3); 01066 push_point( r / sq3, r / sq3, -r / sq3); 01067 push_point( r / sq3, -r / sq3, r / sq3); 01068 push_point( r / sq3, -r / sq3, -r / sq3); 01069 push_point(-r / sq3, r / sq3, r / sq3); 01070 push_point(-r / sq3, r / sq3, -r / sq3); 01071 push_point(-r / sq3, -r / sq3, r / sq3); 01072 push_point(-r / sq3, -r / sq3, -r / sq3); 01073 push_point( 0, r * a, r * b); 01074 push_point( 0, r * a, -r * b); 01075 push_point( 0, -r * a, r * b); 01076 push_point( 0, -r * a, -r * b); 01077 push_point( r * a, r * b, 0); 01078 push_point( r * a, -r * b, 0); 01079 push_point(-r * a, r * b, 0); 01080 push_point(-r * a, -r * b, 0); 01081 push_point( r * b, 0, r * a); 01082 push_point( r * b, 0, -r * a); 01083 push_point(-r * b, 0, r * a); 01084 push_point(-r * b, 0, -r * a); 01085 01086 make_polygon( 10, 8, 4, 18, 6 ); 01087 make_polygon( 10, 8, 0, 16, 2 ); 01088 make_polygon( 11, 9, 1, 17, 3 ); 01089 make_polygon( 9, 11, 7, 19, 5 ); 01090 make_polygon( 17, 16, 2, 13, 3 ); 01091 make_polygon( 17, 16, 0, 12, 1 ); 01092 make_polygon( 19, 18, 6, 15, 7 ); 01093 make_polygon( 19, 18, 4, 14, 5 ); 01094 make_polygon( 12, 14, 4, 8, 0 ); 01095 make_polygon( 12, 14, 5, 9, 1 ); 01096 make_polygon( 13, 15, 6, 10, 2 ); 01097 make_polygon( 13, 15, 7, 11, 3 ); 01098 01099 build_mesh_from_geometry(); 01100 }