# cross product?

This is a discussion on cross product? within the Game Programming forums, part of the General Programming Boards category; This is something that I understand but I'm little puzzled about... why do you want something that is perpendicular to ...

1. ## cross product?

This is something that I understand but I'm little puzzled about...
why do you want something that is perpendicular to both vector a and b?
It's like looking at the sky when crossing the road instead of looking left and right.
Can somebody tell me what application this is good for???

2. Getting the normal to a plane, given stuff in the plane.

3. Originally Posted by tabstop
Getting the normal to a plane, given stuff in the plane.
yes but why is it useful?
example???

4. I think, not being an expert on the subject, that the normal indicates which way the plane is facing, which is useful when figuring out whether a plane is visible or not in a 3D drawing.

--
Mast

5. The normal of a plane is also used to calculate lighting and collision detection among other things in 3D graphics.

6. Collision detection, IIRC.

7. Thanks for all your replies.
Now I have at least a concrete idea on it's application....

8. The cross product is also useful for determining the axis of rotation when rotating from one orientation to another.

EDIT:

As an example if you have two objects and you want to rotate one to face the other you would create a vector from the target object to the active object. You would then cross the look vector of the active object with the vector to the target object. Normalize this and it becomes the axis of rotation to rotate to face the target object. Take the dot product to get the cosine of the angle of rotation and then create an axis angle rotation matrix using this information.

The cross product is excellent for finding up/down relative to any orientation since it always returns a vector perpendicular to the two being crossed.

9. ^little hard time visualizing it but I think I understand it's application.
wow,pieces by pieces all those abstract mathematical notation started to made sense in the real world.