See A Coordinate Free Geometry ADT and Nathan Litke’s Coordinate Free Geometric Programming for inspiration.
Points are “column” vectors.
TODO: Need to support general VRML transformations as well as simple translation and pure rotation transformations.
Bases: numpy.ndarray
Floating point triplet representing a point
Return if Point is close to another Point using numpy.allclose
Bases: numpy.ndarray
Floating point triplet representing a vector
Return if Vector is close to another Vector using numpy.allclose
compute length of vector
convert to unit length vector
compute square length of vector
Bases: builtins.object
4x4 matrix for homogeneous point and vector transformation
When transformations are multiplied left-to-right, the right-most transformations transform the Point/Vector first, i.e., are more local.
Member functions that make in-place modifications, left multiply the current matrix, i.e., make a global change.
orthonormalize rotation part of transformation
Further rotate
Further scale
Further translate
return weighted sum of Points
If no weights are given, then return average.
Same as numpy.cross but return a Vector if arguments are Vectors
Identify transformation
Build a rotation transformation
Build a translation transformation
Build a scaling transformation
X3D transformation specification into single transformation
All angles must be in radians.
Compute viewing transformation
Place :param p0: at origin, :param p1: on the negative z axis, and orient so :param up: is in the same half-plane as the postive y axis and z axis. :param up: can either be a Point or a Vector.
return 4x4 orthographic transformation
return 4x4 perspective transformation
return 4x4 perspective transformation
Like look_at but p1 is at origin
Place :param p0: on positive z axis origin, :param p1: at the origin, and orient so :param up: is in the same half-plane as the postive y axis and z axis. :param up: can either be a Point or a Vector.
Bases: builtins.object
right-handed axis-aligned bounding box
If either BBox.llb or BBox.urf are None, then the bounding box is uninitialized.
expand bounding box to encompass given point
| Parameters: | pt – a Point or other XYZ-tuple |
|---|
expand bounding box to encompass all given points
| Parameters: | pts – a numpy array of XYZ coordinates |
|---|
transform bounding box in place