Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

# Math::Geometry 0.04

Company: Greg McCarroll
Date Added: June 20, 2013  |  Visits: 245

Math::Geometry is a Perl module that implements classic geometry methods. It should be considered alpha software and any feedback at all is greatly appreciated. The following methods are available:<br /><br />vector_product.<br /><br />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.<br /><br />triangle_normal<br /><br />Given a triangle ABC that defines a plane P. This function will return a vector N, which is a normal to the plane P.<br /><br /> (\$Nx,\$Ny,\$Nz) =<br /> triangle_normal((\$Ax,\$Ay,\$Az),(\$Bx,\$By,\$Bz),(\$Cx,\$Cy,\$Cz));<br /><br />zplane_project<br /><br />Project a point in Geometry space onto a plane with the z-axis as the normal, at a distance d from z=0.<br /><br /> (\$x2,\$y2,\$z2) = zplane_project (\$x1,\$y1,\$z1,\$d);<br /><br />rotx<br /><br />Rotate about the x axis r radians.<br /><br /> (\$x2,\$y2,\$z2) = rotx (\$x1,\$y1,\$z1,\$r);<br /><br />roty<br /><br />Rotate about the y axis r radians.<br /><br /> (\$x2,\$y2,\$z2) = roty (\$x1,\$y1,\$z1,\$r);<br /><br />rotz<br /><br />Rotate about the z axis r radians.<br /><br /> (\$x2,\$y2,\$z2) = rotz (\$x1,\$y1,\$z1,\$r);<br /><br />deg2rad<br /><br />Convert degree's to radians.<br /><br />rad2deg<br /><br />Convert radians to degree's.<br />pi<br /><br />Returns an approximate value of Pi, the code has been cribed from Pg146, Programming Perl 2nd Ed.<br /><br />SYNOPSIS<br /><br /> use Math::Geometry;<br /><br /> @P2=rotx(@P1,\$angle);<br /> @P3=rotx(@P1,\$angle);<br /> @N =triangle_normal(@P1,@P2,@P3);<br /> @ZP=zplane_project(@P1,\$d);

 Requirements: No special requirements Platforms: *nix, Linux Keyword: Distance,  Drotxp Angle,  Dtriangle Normalp,  Dzplane Projectp,  Edsynopsis,  Geometry,  Length,  Math,  Math Geometry,  Mathgeometry,  Methods,  Multiplied,  Normal,  Plane,  Radians,  Space,  Vector,  Vectors,  X2y2z2,  Zplane Project Users rating: 0/10