pdk.Plot.Auxilliary ($Date: 2002/12/04 10:15:53 $)
index
pdk/Plot/Auxilliary.py

Auxilliary plotting routines for pdk.

Based on graphite, which was written by Joseph and Michelle Strout in 1999.

Most of the functions in this module should be moved into a C extension for speedup.

FOG 03/2000

 
Classes
            
_Rotate4x4
_Scale4x4
_Translate4x4
 
class _Scale4x4
     
Purpose:4x4 scaling matrix

 
   Methods defined here:
__call__(self, sx, sy, sz, copy=0)
returns a scaling matrix with scaling factors sx, sy, and sz in X, Y, and Z direction, respectively. Do not keep a reference to the scaling matrix unless you set the copy flag.

Data and non-method functions defined here:
M = array([[ 0., 0., 0., 0.], [ 0., 0., ...0., 0., 0., 0.], [ 0., 0., 0., 1.]])
 
class _Rotate4x4
     
Purpose: 4x4 rotation matrix

 
   Methods defined here:
__call__(self, angle, copy=0)
returns a rotation matrix with rotation angle angle. Do not keep a reference to the rotation matrix unless you set the copy flag.

Data and non-method functions defined here:
M = array([[ 0., 0., 0., 0.], [ 0., 0., ...0., 0., 1., 0.], [ 0., 0., 0., 1.]])
 
class _Translate4x4
     
Purpose:4x4 translation matrix

 
   Methods defined here:
__call__(self, tx, ty, tz, copy=0)
returns a translation matrix with translation offsets tx, ty, and tz in X, Y, and Z direction, respectively. Do not keep a reference to the translation matrix unless you set the copy flag.

Data and non-method functions defined here:
M = array([[ 1., 0., 0., 0.], [ 0., 1., ...0., 0., 1., 0.], [ 0., 0., 0., 1.]])
 
Functions
            
cross(v1, v2)
returns the cross product of vectors <v1> and <v2>. May not be appropriate for extended (4-element) vectors.
clip_line(ptA, boundA)

clip the line from ptA0 to ptA1. Returns True if any part remains in the bounds given by boundA; returns False otherwise. boundA is of the form

[[min_x, min_y, min_z, 1.],
 [max_x, max_y, max_z, 1.]]

providing the ranges for the X/Y/Z axes, which are adjusted in place.

clip_points(ptA, boundA)
clips a set of points to given bounds.
data_to_frame(dataA, transA, *funcT)
transforms data to frame coordinates. In the simplest case, returns the dot product of the data point matrix dataA and the transformation matrix transA. If funcT is not None, it provides 2-tuples describing a transformation for the x, y, or z axis, respectively (a transformation function for the corresponding axis and its arguments).
dist(v)
returns the length (distance) of vector <v>
frame_to_view(eye, poi, perspective=0)
returns the matrix for performing the transformation from frame to view coordinates. eye gives the eye location, poi the point of interest.
make_4d_point(p)
extends point coordinates to homogeneous (4d) coordinates.
make_3d_point(p)
extends point coordinates to 3d coordinates.
pt_in_bounds(pt, boundA)
evaluates to True if the point pt lies within the 3D box given by boundA.
pts_in_bounds(ptA, boundA)
filters points in ptA which are not contained in a 3D box given by boundA.
 
Data
             scale_4x4 = instance of _Scale4x4
rotate_4x4 = instance of _Rotate4x4
translate_4x4 = instance of _Translate4x4
 
Author
            
$Author: gathmann $