POV-Ray : Newsgroups : povray.general : Matrices... ...matrixes... ...? : Re: Matrices... ...matrixes... ...? Server Time
30 Jul 2024 06:20:13 EDT (-0400)
  Re: Matrices... ...matrixes... ...?  
From: Tim Attwood
Date: 2 Sep 2009 21:12:48
Message: <4a9f1810$1@news.povray.org>
> Here we go :- Is there any way to convert a Matrix transform into absolute
> Translate&Rotate vectors?

You can extract the translation and scaling always.
The rotation portion could be skew info, so you need
to check if the vectors are perpendicular.
Once you have the angles of the vectors, you can
split that into three rotations...
face the forward vector forward, rotate the others
with it, the first angle, Y
face the forward vector onto the the XZ plane,
the second angle X, bringing the changes along again,
then rotate the right vector to the XZ right, and
that's the third angle Z.
So your final roations are just the inverse of Z,X,Y.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.