|
Author |
Topic: Matrix stack and push/pop (Read 718 times) |
|
flight404
|
Matrix stack and push/pop
« on: Jun 29th, 2003, 1:57am » |
|
Okay, I give. I want to break into the wonderful world of the 3rd dimension, but I lack the basic knowledge. Can anyone refer me to a dumbed down description of a matrix stack and the functionality of the push and pop methods. Doing a cursory check on google shows me more documents that seem to cater to those already blessed with this knowledge. The examples in the learning area of this site dont seem to give enough information for the beginner to grasp the concepts elucidated. Im eager. Help. Point me to a 'Matrix Stacking for Dummies'. Running is quite painful when one doesn't have the basic understanding of how to stand on two feet. Thanks for any advice in this area. And Ariel, no mention of quaternions please. My headache is pounding enough as it is. UPDATE ------------------------------------- There I go answering my own question again. Well, for anyone else that might be suffering a similar lack of knowledge, I found a reasonably good description at ... http://www.edm2.com/0510/opengl.html There is a nice example dealing with how to create the solar system using transform and push/pop. Had plenty of push and pop errors, but finally muddled through it. But don't get me wrong, I would still be interested in reading up on it a bit more. I figured out how to do what I wanted, but I still couldn't tell you what a matrix stack is, exactly. Bring on the Quaternions!!!
|
« Last Edit: Jun 29th, 2003, 8:26am by flight404 » |
|
|
|
|
arielm
|
Re: Matrix stack and push/pop
« Reply #1 on: Jun 29th, 2003, 4:48pm » |
|
i also discovered a few weeks ago that i could learn a lot about 3d in processing by picking from the huge opengl litterature accessible on the web, because processing is based on the same metaphors: vertex, matrix, etc. i'm just starting with quaternions, so at this stage, i understand applications like virtual trackballs or spherical interpolations (smoothly translating from one point to another on a sphere)... but quats are used in advanced camera motion stuff too (e.g. the camera effects in tomb raider)... to be explored... at the end of the day, processing is asking for matrices, so you can do a lot of stuff with say quaternions, but at the end you have to convert back to a matrix, using either: quaternion to matrix or step 1: quaternion to angle & axis step 2: rotate(angle, axis.x, axis.y, axis.z) but between us, step 2 is also tranformed by processing into a matrix... an interesting article, with source code, on quaternions: http://www.gamasutra.com/features/19980703/quaternions_01.htm now let's see your computer-scientist-like-colored-autonomous-spermatozoidal-entities using quats!
|
Ariel Malka | www.chronotext.org
|
|
|
REAS
|
Re: Matrix stack and push/pop
« Reply #2 on: Jun 29th, 2003, 4:53pm » |
|
Ben and I do all of our "advanced" applications in OpenGl and you'll find that 3D in Processing is almost identical. The OpenGL tutorials are a good resource while we wait for the Processing tutorials. I think the best way to begin learning about the matrix and transformations is trial and error. You will quickly develop an intuition for how they work.
|
|
|
|
v3ga
|
Re: Matrix stack and push/pop
« Reply #3 on: Jun 29th, 2003, 11:42pm » |
|
Hello, This document ( http://www.alrj.org/docs/3D/modelview.pdf ) explains all the subtle shades of openGL matrices, including pushing & popping them. As Reas said, openGL stuff could be easily translated to Processing Matrix stuff. (glRotate == rotate, glTranslate == translate, ..)The "only" problem is that it is French written... Arg.
|
« Last Edit: Jun 29th, 2003, 11:47pm by v3ga » |
|
http://v3ga.net
|
|
|
|