Python_2  1.0
Namespaces | Functions
_12a_poly.py File Reference

Namespaces

 _12a_poly
 Draws a 3D polyhedron and allows a user to rotate it (mouse left button and wheel).
 

Functions

def _12a_poly.matMul (m1, m2)
 Return m1 x m2 (m1 multiplied by m2). More...
 
def _12a_poly.vecSub (v1, v2)
 Return vector v2 - v1. More...
 
def _12a_poly.vecAdd (v1, v2)
 Return vector v2 + v1. More...
 
def _12a_poly.vecScale (v, s)
 Return vector v * s. More...
 
def _12a_poly.veclen (p, q)
 Length of vector from point p = (x1,y1,...,x1n) to q = (x,y,...,xn). More...
 
def _12a_poly.normalize (p)
 Normalize a vector. More...
 
def _12a_poly.transpose (M)
 Transpose a matrix. More...
 
def _12a_poly.bbox (p)
 Bounding Box of a polyhedron. More...
 
def _12a_poly.translate (poly, t)
 Translate a polyhedron. More...
 
def _12a_poly.centroid (vtx)
 Centroid of a convex face. More...
 
def _12a_poly.crossProd (U, V)
 Return cross product U x V. More...
 
def _12a_poly.dotProd (u, v)
 Return the dot product of two vectors. More...
 
def _12a_poly.getNormal2 (p)
 Face normal vector. More...
 
def _12a_poly.ROT_X (x)
 counter-clockwise rotation about the X axis More...
 
def _12a_poly.ROT_Y (y)
 counter-clockwise rotation about the Y axis More...
 
def _12a_poly.ROT_Z (z)
 counter-clockwise rotation about the Z axis More...
 
def _12a_poly.EPS (d)
 angular displacement as a function of a number of pixels. More...
 
def _12a_poly.eps (d)
 angular displacement as a function of the sign of a number of pixels. More...
 
def _12a_poly.getNormal (poly)
 Polygon normal by Newell's method. More...
 
def _12a_poly.drawAxes ()
 Draw coordinate axes. More...
 
def _12a_poly.makeBox (box)
 Make a bounding box. More...
 
def _12a_poly.drawBbox ()
 Draw the current polygon bounding box. More...
 
def _12a_poly.DrawObj (obj, col)
 Draw a polyhedron. More...
 
def _12a_poly.getNormalLine (p, C, col)
 Return a line corresponding to a face normal. More...
 
def _12a_poly.drawFace (p, pc, cent, col1, col)
 Draw a face of the polyhedron, if it is visible. More...
 
def _12a_poly.init ()
 
def _12a_poly.cbClicked (event)
 
def _12a_poly.cbMotion (event)
 
def _12a_poly.wheelUp (event)
 
def _12a_poly.wheelDown (event)
 
def _12a_poly.wheel (event)
 
def _12a_poly.resize (event)
 
def _12a_poly.toggleFill (event)
 
def _12a_poly.toggleNormal (event)
 
def _12a_poly.toggleObj (event)
 
def _12a_poly.toggleDebug (event)
 
def _12a_poly.help (event)
 
def _12a_poly.exit (event)
 
def _12a_poly.main ()