Math::Project3D doesn't work for me

M

Mike Flannigan

I'm trying to use the Math::project3D module. I successfully
installed it with ppm. When I run the example script shown
below (modified slightly to scope the variables), it gives the
error
"Use of uninitialized value in sin at (eval 1) line 4.
Use of uninitialized value in cos at (eval 1) line 4.
Math::MatrixReal::new_from_string(): syntax error in input stringString
is [ ]
___

at . . . /Project3D.pm line 166"

Lines 166 - 170 are:
my $point = Math::MatrixReal->new_from_cols(
[
[ $self->{function}->(@_) ],
]
);

If anybody can help me make it work, I'd appreciate it.
I'm using Perl 5.8 on a Win2000 box.

It's amazing to me that the supplied examples on many
of these modules do not work.


Mike

___________________________

use strict;
use warnings;

use Math::project3D;

my $projection = Math::project3D->new(
plane_basis_vector => [0, 0, 0],
plane_direction1 => [.4, 1, 0],
plane_direction2 => [.4, 0, 1],
projection_vector => [1, 1, 1], # defaults to normal of the
plane
);

my $u;
my $v;
$projection->new_function(
'u,v', 'sin($u)', 'cos($v)', '$u'
);

my ($plane_coeff1, $plane_coeff2, $distance_coeff) =
$projection->project( $u, $v );


__END__
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,125
Messages
2,570,748
Members
47,302
Latest member
MitziWragg

Latest Threads

Top