예제 #1
0
 def _set_vertices( self ):
     self.vertices = ( 
         vector_3d( -1,-1,1 ),
         vector_3d( 1,-1,-1 ),
         vector_3d( 1,1,1 ),
         vector_3d( -1,1,-1 )
     )
예제 #2
0
 def _sphere_to_cart( theta, phi, numeric = True ):
     ret_val = vector_3d( \
         s.sin( theta ) * s.cos( phi ), \
         s.cos( theta ), \
         s.sin( theta ) * s.sin( phi ) )
     if numeric:
         ret_val = ret_val.evalf()
     return ret_val
예제 #3
0
 def _sphere_to_cart( theta, phi ):
     return vector_3d( \
         s.sin( theta ) * s.cos( phi ), \
         s.cos( theta ), \
         s.sin( theta ) * s.sin( phi ) )
예제 #4
0
 def _set_vertices( self ):
     half = Rational(1,2)
     half_phi = (GoldenRatio / 2)
     self.vertices = ( 
         vector_3d( -half, half_phi, 0 ),
         vector_3d( half, half_phi, 0 ),
         vector_3d( 0, half, -half_phi ),
         vector_3d( -half_phi, 0, -half ),
         vector_3d( -half_phi, 0, half  ),
         vector_3d( 0, half, half_phi ),
         vector_3d( half_phi, 0, -half ),
         vector_3d( 0, -half, -half_phi ),
         vector_3d( -half, -half_phi, 0 ),
         vector_3d( 0, -half, half_phi ),
         vector_3d( half_phi, 0, half ),
         vector_3d( half, -half_phi, 0 )
     )