Logo by KRAFTWERK - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. March 29, 2024, 09:36:58 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Rotation matrix & inverse rot  (Read 6815 times)
0 Members and 1 Guest are viewing this topic.
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« on: June 18, 2011, 01:18:01 PM »

Question to Jesse (and/or other folks) cheesy

The function Rotate gives a "rotation matrix" for three given angles; x,y,z

Is it easy to get the reverse rotation starting from it?

I mean, for the rotation -x,-y,-z. wink

Luca

Rot matrix is in form;

x' = x*m[0,0] + y*m[0,1] + z*m[0,2]
y' = x*m[1,0] + y*m[1,1] + z*m[1,2]
z' = x*m[2,0] + y*m[2,1] + z*m[2,2]
Logged

No sweat, guardian of wisdom!
Jesse
Download Section
Fractal Schemer
*
Posts: 1013


« Reply #1 on: June 19, 2011, 01:47:25 AM »

If you flip the indizes you get the inverse rotation, m[y,x] -> m[x,y]

cheers
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #2 on: June 19, 2011, 04:38:57 PM »

If you flip the indizes you get the inverse rotation, m[y,x] -> m[x,y]

cheers

Okay! m[0,0] is the first param in memory, and others follow in order?  smiley
Logged

No sweat, guardian of wisdom!
Jesse
Download Section
Fractal Schemer
*
Posts: 1013


« Reply #3 on: June 19, 2011, 11:33:01 PM »

Ok, a bit more details (was late yesterday  Azn)

It is the transposed matrix, so if you want to use the same rotation matrix you would calculate the inverse rotation this way:

x' = x*m[0,0] + y*m[1,0] + z*m[2,0]
y' = x*m[0,1] + y*m[1,1] + z*m[2,1]
z' = x*m[0,2] + y*m[1,2] + z*m[2,2]


Or you transpose the matrix first (mtmp=m; for x=0 to 2 for y=0 to 2 m[x,y] = mtmp[y,x]) and do your standard rotation calculation with the transposed matrix.

This way to do the inverse rotation works only with pure normalized rotation matrices, should be noticed.
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #4 on: June 20, 2011, 08:55:50 AM »

I already knew it, I studied matrices for the university wink
I am asking if the first matrix element is loaded in the first memory cell on function call ... There is no hurry to reply I can also find the answer by myself lol
Logged

No sweat, guardian of wisdom!
Jesse
Download Section
Fractal Schemer
*
Posts: 1013


« Reply #5 on: June 21, 2011, 01:26:10 AM »

I see, so you missed some lessons?  wink
 grin

The user parameters are in decreasing order, so the first matrix entry m[0,0] is on the top, next m[0,1] one below... etc.

Just don't rely on a special right or left hand rule for rotations, i have no strong relation to standards  smiley

cheers


 
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #6 on: June 21, 2011, 09:26:34 AM »

I see, so you missed some lessons?  wink
 grin

Italian education system is not very good... grin

Now I will try with your quick course grin A Beer Cup
Logged

No sweat, guardian of wisdom!
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Rotation Matrix Mset Mandelbrot & Julia Set M Benesi 1 1799 Last post June 02, 2013, 08:30:51 PM
by M Benesi
Julia Set Inverse Iteration... IFS - Iterated Function Systems Chris Thomasson 14 12118 Last post May 20, 2015, 07:32:07 PM
by youhn
inverse OpenGL issue on OSX Fragmentarium Patryk Kizny 5 4206 Last post July 11, 2015, 01:45:34 AM
by 3dickulus
Inverse Fractals Introduction to Fractals and Related Links cye 7 7366 Last post January 30, 2017, 10:32:11 AM
by superheal
The 4d rotation matrix! Mathematics DarkBeam 2 4472 Last post November 20, 2016, 01:40:49 PM
by Sabine

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.17 seconds with 25 queries. (Pretty URLs adds 0.006s, 2q)