POV-Ray : Newsgroups : povray.general : normals function : Re: normals function Server Time
3 Aug 2024 22:13:42 EDT (-0400)
  Re: normals function  
From: Christopher James Huff
Date: 14 Jan 2004 16:27:17
Message: <cjameshuff-375047.16273514012004@netplex.aussie.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.