good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Doing rigid body rotations in Perlby mwah (Hermit) |
on Oct 03, 2007 at 19:46 UTC ( [id://642485]=perlquestion: print w/replies, xml ) | Need Help?? |
mwah has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks, lately I stumbled over my old c++ code for fast rigid body rotations using a rotational matrix formalism /1,2/. Because I needed a snippet to be ready fast, I rewrote the stuff in plain Perl without doing a deep investigation into CPAN first. After having completed the task, I started to lookaround there but couldn't find anything appropriate which does somehow what I needed. Simple example - say we have a 3D rigid body template consisting of 5 coordinates (+ labels): Say we need to construct an ensemble of copies of rigid bodies by applying random translations and rotations around ar- bitary axes on the template, like (pseudocode): The above code should make my intention clear before I start to work out a module + XS matrix operations, which modules should I have considered before? Regards & thanks mwa /1/ - Ha,C. and Radcliffe,C.W. (1978) Kinematics and Mechanism Design. Wiley, New York, 45. /2/ - http://peds.oxfordjournals.org/cgi/reprint/16/10/717
Back to
Seekers of Perl Wisdom
|
|