POV-Ray : Newsgroups : povray.advanced-users : rotating around x-axis inside povray : Re: rotating around x-axis inside povray Server Time
29 Jul 2024 18:20:39 EDT (-0400)
  Re: rotating around x-axis inside povray  
From: Josh English
Date: 27 Feb 2001 08:39:12
Message: <3A9BAE6C.7589C512@spiritone.com>
Vahur Krouverk wrote:

> Remco Poelstra wrote:
> > Because I'm writing a program that does some matrix calculations and
> > outputs to povray.
> > Now I was wondering how the matrices on
> > http://enphilistor.users4.50megs.com/matrix.htm
> > are constructed. I redesigned them by hand, and came out by the same
> > matrices, except that I use the second method to multiply. ie, the
> > vector as a column, not a row.
> >
> If 3x3 matrix (i.e. without transformations) is used then matrix is
> same, regardless of multiplying vector row with matrix (i.e. vectors are
> seen as rows) or matrix with vector column (vectors are seen as
> columns). Difference comes, when You use 4x4 matrix, then matrix is
> different (translation is either in last row or column).


Actually, they don't. If v = <a,b,c> and M is a 3x3 matrix, multiplying the
row vector on the left gives you a different answer than multiplying the
column vector on the right.
v = <a,b,c>
M = d e f
       g h i
       j k l

vM = <ad+bg+dj, ae+bh+ak, af+bi+cl>
Mv = <ad+be+cf, ag+bh+ci, aj+bk+bl>

If you switch the order of the vector and the matrix, you have to transpose
the matrix

--
Josh English -- Lexiphanic Lethomaniac
eng### [at] spiritonecom
The POV-Ray Cyclopedia http://www.spiritone.com/~english/cyclopedia/
"He who hebetates is last."


Post a reply to this message

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