Example #1
0
 def __init__(self, bottom_center, axis, height, R):
     
     self.axis = axis
     self.height = height
     self.R = R
     
     components = [ZLayerComponent(), ZCylinderComponent()]
     FixedConvexIntersection.__init__(self, bottom_center, components)
Example #2
0
 def __init__( self, center, planes, R ):
     # TODO: rather add R as an attribute to Tracer...
     components = []
     for p in planes:
         halfspace = HalfSpaceComponent( p, vec_norm(p) )
         components.append(halfspace)
     
     FixedConvexIntersection.__init__(self, center, components)
     self.linear_transform(scaling=R)
Example #3
0
 def __init__(self, tip, axis, height, R):
     self.axis = axis
     self.height = height
     self.R = R
     
     z = (0,0,1)
     
     components = [
         HalfSpaceComponent(normal=z, h=1.0),
         ZConeComponent()
     ]
     FixedConvexIntersection.__init__(self, tip, components)
Example #4
0
 def __init__( self, center, vertices, R ):
     """
     The vertices and their symmetries about the center (i.e.,
     v -> -v) define the dual polyhedron of the result. R is a
     scaling factor. If R is 1 and the center is (0,0,1), then 
     a vertex, face or edge of the polyhedron is on the ground
     plane {z = 0}.
     """
     
     components = []
     for v in vertices:
         layer = LayerComponent( tuple([-x for x in v]), vec_norm(v)*2.0 )
         layer.position = v
         components.append(layer)
     
     FixedConvexIntersection.__init__(self, center, components)
     self.linear_transform(scaling=R)