• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

ChangesH A D19-Aug-2002349 127

MANIFESTH A D02-Feb-2002145 1312

Makefile.PLH A D20-Jun-2001328 107

READMEH A D02-Feb-20022.9 KiB6649

VectorReal.pmH A D19-Aug-200221 KiB641254

matrix_test.outH A D20-Jun-20011.2 KiB3224

matrix_test.plH A D12-Jul-20012.8 KiB8739

synopsis.outH A D20-Jun-20011.7 KiB5544

synopsis.plH A D12-Jul-20012.4 KiB6846

test.plH A D02-Feb-20022.4 KiB8046

vector_test.outH A D20-Jun-20011.7 KiB7661

vector_test.plH A D12-Jul-20013.1 KiB131103

README

1
2Math::VectorReal - Module to handle 3D Vector Mathematics
3
4The `Math::VectorReal' package defines a 3D mathematical "vector", in a way
5that is compatible with the previous CPAN module `Math::MatrixReal'.  However
6it provides a more vector oriented set of mathematical functions and overload
7operators, to the `MatrixReal' package. For example the normal perl string
8functions "x" and "." have been overloaded to allow vector cross and dot
9product operations. Vector math formula thus looks like vector math formula in
10perl programs using this package.
11
12While this package is compatible with Math::MatrixReal, you DO NOT need to
13have that package to perform purely vector orientated calculations.  You will
14need it however if you wish to do matrix operations with these vectors. The
15interface has been designed with this package flexibility in mind.
16
17The vectors are defined in the same way as a "row" `Math::MatrixReal' matrix,
18instead of that packages choice of "column" definition for vector operations.
19Such vectors are multiplied to matrices with the vector on the left and the
20matrix on the right. EG:   v * M -> 'v
21
22Not only is this the way I prefer to handle vectors, but it is the way most
23graphics books use vectors. As a bonus it results in no overload conflicts
24between this package and that of Math::MatrixReal, (the left objects overload
25operator is called to do the mathematics). It also is a lot simpler than
26`MatrixReal' column vector methods, which were designed for equation solving
27rather than 3D geometry operations.
28
29The vector_matrix() function provided, simplifies the creation a `MatrixReal'
30object from 3 (usually orthogonal) vectors. This with its vector orientated
31math operators makes it very easy to define orthogonal rotation matrices from
32C<Math::VectorReal' objects. See a rough example in the synopsis above, or in
33the file "matrix_test" in the packages source.
34
35
36Prerequisites:
37--------------
38
39Perl version 5.000 or higher. But no other modules are required.
40
41Installing Math::MatrixReal is an advantage if you also want to do vector -
42matrix calculations.  This Package was designed to work transparently with
43this package if you want to perform such mathematics. But it is NOT required.
44
45
46Installation:
47-------------
48
49The usual drill for Perl CPAN modules...
50   perl Makefile.PL
51   make
52   make test
53   make install
54
55
56Anthony Thyssen <anthony@cit.gu.edu.au>    http://www.sct.gu.edu.au/~anthony/
57 -----------------------------------------------------------------------------
58   We will encourage you to develop the three great virtues of
59       a programmer :   laziness, impatience and hubris.
60                                      --- Larry Wall - "Programming Perl"
61 -----------------------------------------------------------------------------
62Copyright (c) 2001 Anthony Thyssen. All rights reserved. This program is free
63software; you can redistribute it and/or modify it under the same terms as
64Perl itself. I would appreciate any suggestions however.
65
66