Manual Reference Pages - MATH::GEOMETRY (3)
Math::Geometry - Geometry related functions
This is about to get a massive overhaul, but first im adding tests,
lots of lovely lovely tests.
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. Im currently looking into how to properly handle z=0 and will
update it shortly.
This package implements classic geometry methods. It should be considered alpha
software and any feedback at all is greatly appreciated. The following methods
Also known as the cross product, given two vectors in Geometry space, the
vector_product of the two vectors, is a vector which is perpendicular
to the plane of AB with length equal to the length of A multiplied
by the length of B, multiplied by the sin of @, where @ is the angle
between the two vectors.
Given a triangle ABC that defines a plane P. This function will return
a vector N, which is a normal to the plane P.
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);
Rotate about the x axis r radians.
($x2,$y2,$z2) = rotx ($x1,$y1,$z1,$r);
Rotate about the y axis r radians.
($x2,$y2,$z2) = roty ($x1,$y1,$z1,$r);
Rotate about the z axis r radians.
($x2,$y2,$z2) = rotz ($x1,$y1,$z1,$r);
Convert degrees to radians.
Convert radians to degrees.
Returns an approximate value of Pi, the code has been cribed from Pg146, Programming Perl
Greg McCarroll <firstname.lastname@example.org>
Copyright 2006 by Greg McCarroll <email@example.com>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|perl v5.20.3 ||GEOMETRY (3) ||2006-08-19 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.