in reply to Using PDL for rotations
The other thing is that $e will be a transform object which requires you to use it like this:$e = t_rot([45,45,45]);
The final thing is that matrix multiplication is the x operator whereas * is component-wise multiplication.$d = $e->apply($c);
Update: There's a bug in the code/documentation for t_rot. The work-around is to use t_linear and also specify a dims argument:
The problem can be demonstrated by setting $PDL::Transform::debug = 1;:$e = t_linear({ rot => [45,45,45], dims => 3});
$PDL::Transform::debug = 1; $e = t_linear({ rot => [45,45,45] }); # the above will emit: # PDL::Transform::Linear: assuming 2-D transform (set dims option to + change)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using PDL for rotations
by etj (Priest) on Jun 07, 2022 at 02:53 UTC | |
|
Re^2: Using PDL for rotations
by Anonymous Monk on Apr 29, 2008 at 19:09 UTC | |
by plobsing (Friar) on Apr 29, 2008 at 20:23 UTC |