Thanks for the answers. One more question, is there any build in function
for rotationa around an arbitrary axis of the object? If there isnt I am
planning to first rotate all the object so that the arbitrary axis concides
with say x axis, rotate the object around the x axis and apply the inverse
of the first transformation to put the arbirtrary axis back in its place.
But somehow this seems computationally really inefficient. I am might also
think of a way to transform rotations around an arbitrary axis to their
correspoding transformation angles around x,y,z axis that also is I assume
possible...

On Tue, Apr 29, 2008 at 7:37 PM, Sina Türeli <[EMAIL PROTECTED]> wrote:

> Ok, for a certain program I am writing (protein folding), I need to be able
> perform rotations. I was first planning to do it manually by defining
> rotation matrices and change of basis matrices etc but I think pdl might
> save me time. However I am not sure how to use its use PDL::Transform to do
> so. Here is a piece of code that I was using to experiment with pdl
>
> use PDL;
> use PDL::Transform;
>
> @a = [[1,0,0],[0,1,0],[0,0,1]];
>
> $c= pdl @a;
>
> $e = t_rot(45,45,45);
>
> $c = $e * $c
>
> print $c;
>
> I was hoping this would rotate my 1,1,1 vector in all directions by 45
> degrees but it gives the error. "Hash given as a pdl - but not {PDL} key!".
> I am not able to understand what this error is for? Also I have seen no
> tutorial where these rotationa matrices are explained so I would appreciate
> any help, thanks.
>
> --
> "Vectors have never been of the slightest use to any creature. Quaternions
> came from Hamilton after his really good work had been done; and though
> beautifully ingenious, have been an unmixed evil to those who have touched
> them in any way, including Maxwell." - Lord Kelvin
>
>


-- 
"Vectors have never been of the slightest use to any creature. Quaternions
came from Hamilton after his really good work had been done; and though
beautifully ingenious, have been an unmixed evil to those who have touched
them in any way, including Maxwell." - Lord Kelvin
_______________________________________________
Perldl mailing list
Perldl@jach.hawaii.edu
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to