View Full Version : use of vector algebra in 3d graphics
hi all ,
I just want to know where/how do you use vector algebra in 3d graphics. While i've read that you use dot product and vector product in 3d graphics, but how do you use it and in what context?
please let me know if there are any links that explain this.
your reponse is greatly appreciated.
12-01-2002, 11:12 PM
I primarilly use vector algebra to rotate points and calculate lighting normals.
For example when you want to spin an object around a certain point, or rotate your camera view vector.
Use the cross product to calculate lighting normals. Saves you a lot of time calculating and entering them yourselves.
When you want to do very basic stuff that is about the only places where you need the algebra. But I'm sure there are many more things you can use it for.
12-02-2002, 10:47 AM
Vector algebra is used all over the place in 3d graphics. The simplest as structural mentioned is for lighting normals. You can use the cross product (or as you say the vector product) to get the surface normal to pass into the lighting equation.
The dot product comes in pretty handy too. If you want to know about what the angle between two vectors is or if you want it to do backface culling. I actually just learnt about this in a post i made, but if the dotproduct of the view vector (from the monitor into the screen) and the surface normal is less than zero, it's a back of a surface and can be culled, but if it is greater than or equal to 0 it is drawn. There is also a form of bumpmapping that relies on the dot product. I think it's called dot3 bump mapping. Simulating fluids in grahphics involve a lot of vectors too. There are tons of uses!
I really appreciate your response. I just got the hang of this vector funda in 3d graphics from your response.
Thanks once again.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.