MAN page from Old RedHat 6.X perl-Math-Geometry-0.02-7.i386.rpm
Geometry
Section: User Contributed Perl Documentation (3)
Updated: perl 5.005, patch 03
Index NAME
Math::Geometry - Geometry related functions
SYNOPSIS
use Math::Geometry;
@P2=rotx(@P1,$angle); @P3=rotx(@P1,$angle); @N =triangle_normal(@P1,@P2,@P3); @ZP=zplane_project(@P1,$d);
NOTES
Currently for zplane_project onto a plane with normal of the z axis and z=0, the function returns the orthographic projections as opposed to a perspective projection. I'm currently looking into how to properly handle z=0 and will update it shortly.
DESCRIPTION
This package implements classic geometry methods. It should be considered alpha software and any feedback at all is greatly appreciated. The following methods are available:
vector_product.
Also known as the cross product, given two vectors in Geometry space, thevector_product of the two vectors, is a vector which is perpendicularto the plane of
AB with length equal to the length of A multipliedby the length of B, multiplied by the sin of @, where @ is the anglebetween the two vectors.
triangle_normal
Given a triangle
ABC that defines a plane P. This function will returna vector N, which is a normal to the plane P.
($Nx,$Ny,$Nz) = triangle_normal(($Ax,$Ay,$Az),($Bx,$By,$Bz),($Cx,$Cy,$Cz));
zplane_project
Project a point in Geometry space onto a plane with the z-axis as the normal,at a distance d from z=0.
($x2,$y2,$z2) = zplane_project ($x1,$y1,$z1,$d);
rotx
Rotate about the x axis r radians.
($x2,$y2,$z2) = rotx ($x1,$y1,$z1,$r);
roty
Rotate about the y axis r radians.
($x2,$y2,$z2) = roty ($x1,$y1,$z1,$r);
rotz
Rotate about the z axis r radians.
($x2,$y2,$z2) = rotz ($x1,$y1,$z1,$r);
deg2rad
Convert degree's to radians.
rad2deg
Convert radians to degree's.
pi
Returns an approximate value of Pi, the code has been cribed from Pg146, Programming Perl 2nd Ed.
EXAMPLE
use Math::Geometry;
AUTHOR
Greg McCarroll <gregAATTmccarroll.demon.co.uk>
Index
- NAME
- SYNOPSIS
- NOTES
- DESCRIPTION
- vector_product.
- triangle_normal
- zplane_project
- rotx
- roty
- rotz
- deg2rad
- rad2deg
- pi
- EXAMPLE
- AUTHOR
This document was created byman2html,using the manual pages.