Okay this part seems important. Where in the documentation does it write
that? So if to rotate around an arbitrary axis, I compose three rotation
matrices T^-1.R.T<v>, where T takes the arbitrary axis to x axis, R does the
rotation around x axis and T^-1 maps the arbitrary axis back to its original
direction how much of an inefficiency are we talking about. This is likely
to operate on a data set of anywhere between 100 to 10000 coordinates. These
T and R operators are all t_linear rotation operator in PDL. When saying
build your own rotation matrix do you mean from scratch and by just using
multplication and inverse operations defined in PDL and not any t_linear
opeartions...

Thanks alot for your help

On Tue, Apr 29, 2008 at 11:23 PM, Craig DeForest <[EMAIL PROTECTED]>
wrote:

>  You can compose transformations to get to the axis you want, but as you
> will have seen in the documentation it is inefficient because the code just
> strings the transformations together. If your data are big then you will
> want instead to build your own rotation matrix (or extract the one in the
> transform) to minimize the number of passes. You can still use Transform to
> encapsulate the operations, which is good in case you later want to
> generalize.  t_linear will accept a matrix if you want.
>
> On Apr 29, 2008, at 1:26 PM, "Sina Türeli" <[EMAIL PROTECTED]> wrote:
>
>  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
>
>


-- 
"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