|
|
In article <4001f8e5@news.povray.org>, Warp <war### [at] tagpovrayorg>
wrote:
> Christopher James Huff <cja### [at] earthlinknet> wrote:
> > Anyway, that means acos(A.x) means the same thing as acos(vdot(A, x)):
> > the angle in radians between the vector and the x axis.
>
> Only if A is a unit vector. (If it isn't, you need to normalize
> it first.)
Right...I always forget to say that. And to clarify, it's only the part
about the angle that's wrong: acos(A.x) only means the angle in radians
if A is unit-length, it does mean the same thing as acos(vdot(A, x)).
You need acos(A.x/vlength(A)) or acos(vdot(A, x)/vlength(A)). Or, given
two arbitrary vectors, acos(vdot(A, B)/(vlength(A)*vlength(B)))
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/
Post a reply to this message
|
|