Panotools::Matrix(3)
π Panotools::Matrix π
okay so bestie, welcome to Panotools::Matrix β the User Contributed Perl Documentation page for the little math gremlin that does miscellaneous math for panoramic images. yes it's a Perl module, yes it's iconic, yes we're doing this. π¦
β¨ SYNOPSIS β¨
$matrix = rollpitchyaw2matrix ($roll, $pitch, $yaw);
and like, the one thing you cannot forget: all angles are in radians not degrees. radians. not degrees. i will not be repeating myself (i will be repeating myself). π
πΈ DESCRIPTION πΈ
rollpitchyaw2matrix hands you back a matrix arrayref, and that matrix encapsulates a transformation that's suitable for rotating a vector/point by three degrees of freedom β that's roll, pitch and yaw, the holy trinity π
here's the vibe of each one, and ngl the signs are the whole personality:
rollβ positive rotation around the x-axispitchβ negative rotation around the y-axis (yes, negative, don't come for me)yawβ negative rotation around the z axis
notice how pitch and yaw are the negative ones?? that's not a typo, that's just how she is. π
π USAGE π
okay so here's the whole group-chat-approved workflow, start to finish:
use Panotools::Matrix qw(matrix2rollpitchyaw rollpitchyaw2matrix
multiply);
my $point = [[$x1], [$y1], [$z1]];
my $matrix = rollpitchyaw2matrix ($roll, $pitch, $yaw);
my $result = multiply ($matrix, $point);
($x2, $y2, $z2) = ($result->[0][0], $result->[1][0], $result->[2][0]);
so you import matrix2rollpitchyaw, rollpitchyaw2matrix and multiply β that's the trio π β you build your $point as a nested arrayref of [$x1], [$y1], [$z1], you cook up your $matrix with rollpitchyaw2matrix ($roll, $pitch, $yaw), you smash them together with multiply ($matrix, $point), and then you pluck the fresh coordinates straight out of the result with $result->[0][0], $result->[1][0] and $result->[2][0]. and that's ($x2, $y2, $z2). ate. π₯
reminder bestie:$roll,$pitchand$yawgo in as radians. if your pano looks cursed, it's probably degrees. i'm just saying. π
and that's the whole page, fr fr π this was Panotools::Matrix(3), served up from the User Contributed Perl Documentation, brought to you by perl v5.42.0 on 2025-07-25. go rotate something pretty. mwah π«Άβ¨πΈ
π¦ where this page comes from
- fedora 43: perl-Panotools-Script 0.29-20.fc43 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms