Advertisement

Normal Vector Rotations

Started by December 17, 2000 01:38 AM
5 comments, last by Wavarian 23 years, 10 months ago
Alrighty then... Ive made a quad which has a normal of [0,0,1] and then ive rotated it, shall we say, 56.17 degrees about the y-axis.. this has obviously changed the normal: glRotatef(56.17,0,1,0); {Please excuse the pascal code} glNormal3f(0,0,1); What i was wondering, was how to extract the values of the new normal after undergoing the rotation, WITHOUT all that inaccurate math like X=Z*Cos(56.17)+X*Sin(56.17) or whatever.. is there some way to extract these values from one of openGL''s many matrices? If so, may i ask How?! Thanks ppl =P -- Wav
Hellooooooooooooooo out there!

:/
Advertisement
I''m also having no luck trying to figure this exact problem... anyone wanna help?
-Darkness
"You think that''s air your breathing now?"
Hi, I think you need to use rotation matrixes or quaternions.
Go to www.gamasutra.com, they got some tutorials about quaternions, which they suggest to use to solve rotations on the 3 axis.
Good luck !


Why do you need to recalculate it? If you use glRotatef you should not need to recalculate the normal you can just use the old coordinates and the old normal and OpenGL figures out the rest.
Prosser: But the plans were on display.Arthur Dent: On display? I eventually had to go down to the cellar.Prosser: That's the display department.Arthur Dent: With a torch.Prosser: The lights had probably gone.Arthur Dent: So had the stairs.Prosser: But you did see the notice, didn't you?Arthur Dent: Oh, yes. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign outside the door saying "Beware of the Leopard." Ever thought of going into advertising?
That''s not the case. Ive used the normal [0,0,1] for opengl after rotating it, but i need to know the rotated normal for other math calculations - not for opengl.
Advertisement
have a search for ''rotation of vectors'' also be aware a normal equals a unit which equals one.

http://members.xoom.com/myBollux

This topic is closed to new replies.

Advertisement