Using the Dot Product
Hi,
1.
What is the scalar returned by the dot product used for???
2.
What are the uses of the dot product besides for finding the angle between 2 vectors and projections??
Thanks,
T.J
#1. The dot product (provided the two vectors are normalized) produces the cosine of the angle between the two vectors. So if the value produced is 0, the vectors are perpindicular to each other (cos of 90 and 180 is 0).
#2. What more do you want?!?
Vyvyan
#2. What more do you want?!?
Vyvyan
I have seen it used to calculate the distance between a vector and a plane (uing the normal of the plane), however I can''t see how this works. Any ideas??
T.J
T.J
The dot-product is used in many calculations
Yep, I think it is used in this formula, though i can''t remember it at the moment. (My Math books are at home
cya,
Phil
Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states ;-)
Yep, I think it is used in this formula, though i can''t remember it at the moment. (My Math books are at home
cya,
Phil
Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states ;-)
Visit Rarebyte! and no!, there are NO kangaroos in Austria (I got this question a few times over in the states ;) )
Dot Product can also be used to quickly find out which side of a plane a point lies on. This is exploited in BSP trees, and a calclation would look something like this:
That''s basically it.
========
Smidge
www.smidge-tech.co.uk
========
VECTOR vLook = EyeVector - AnyPointOnPlane;fValue = DotProduct(vLook, PlaneNormal);if (fValue > 0) // It''s in front of the plane.else if (fValue < 0) // It''s behind the plane.else // It''s on the plane exactly.
That''s basically it.
========
Smidge
www.smidge-tech.co.uk
========
--Mr Smidge
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement