Cubes in 3d space
PhilipRBrenan@yahoo.com, 2004, Perl License
Example t/cube.t
#_ Cube _______________________________________________________________ # Test cube # philiprbrenan@yahoo.com, 2004, Perl License #______________________________________________________________________ use Math::Zap::Cube unit=>u; use Test::Simple tests=>5; ok(u eq 'cube(vector(0, 0, 0), vector(1, 0, 0), vector(0, 1, 0), vector(0, 0, 1))'); ok(u->a eq 'vector(0, 0, 0)'); ok(u->x eq 'vector(1, 0, 0)'); ok(u->y eq 'vector(0, 1, 0)'); ok(u->z eq 'vector(0, 0, 1)');
Define and manipulate a cube in 3 dimensions
Create a rectangle from 3 vectors:
Synonym for "new"
Unit cube
Check that an anonymous reference is a reference to a cube and confess if it is not.
Same as "check" but return the result to the caller.
Components of cube
Create a cube from another cube
Get/Set accuracy for comparisons
Add a vector to a cube
Subtract a vector from a cube
Cube times a scalar
Cube divided by a non zero scalar
Print cube
Triangulate cube
Operator overloads
Add operator.
Subtract operator.
Multiply operator.
Divide operator.
Equals operator.
Print a cube
Export "cube", "unit"
philiprbrenan@yahoo.com
philiprbrenan@yahoo.com, 2004
Perl License.
To install Math::Zap::Draw, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Math::Zap::Draw
CPAN shell
perl -MCPAN -e shell install Math::Zap::Draw
For more information on module installation, please visit the detailed CPAN module installation guide.