M
Mike Flannigan
I'm trying to use the Math:roject3D 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:roject3D;
my $projection = Math:roject3D->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__
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:roject3D;
my $projection = Math:roject3D->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__