|
|
1) vdot()
given normalized vectors A and B, vdot(A,B) is 1 if they are parallel/equal,
0 if perpendicular, -1 if pointing in opposite directions, and in general,
cos(angle between). So the condition you are looking for is vdot(A,B)<0.
Given general normalized or un-normalized vectors,vdot(A,B)>0 means angle
less than 90, vdot(A,B)=0 are perpendicular, and vdot(A,B)<0 means angle
more than 90.
2) vdot(vnormal(A),vnormal(B))=1 for any two parallel vectors
Chris
"Micha Riser" <mri### [at] gmxnet> wrote in message
news:3b8e877a$1@news.povray.org...
> What is the easiest (fastest) way to check in pov whether the angle
between
> two normalized vectors is >90 degrees? I am currently testing if
> vlength(A-B)>sqrt(2)
>
> And what is the easiest way to check if two colinear vectors point in the
> same direction?
>
> - Micha
Post a reply to this message
|
|