in reply to Polar Co-Ordinates: Rotating a 3D cartesian point around a fixed axis?
Math::Vector::Real provides the method rotate_3d that already does what you want:
use Math::Vector::Real; $offset = V($x, $y, $z); $p_rotated_1deg = $axis->rotate_3d(1*$pi/180, $p - $offset) + $offset;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Polar Co-Ordinates: Rotating a 3D cartesian point around a fixed axis?
by fraizerangus (Sexton) on Jun 28, 2012 at 10:11 UTC | |
by salva (Canon) on Jun 28, 2012 at 20:56 UTC |
In Section
Seekers of Perl Wisdom