|
|
SamuelT <STB### [at] aolcom> wrote:
> Does anybody know how vlength converts vectors to floats? I've use it,
> but I'm interested in knowing what the output is. Does it average the
> vector numbers to create one float? Thanks in advance.
I think you'll find it uses something more Pythagorean than a simple
average: the formula for the length of a vector (as shown in the POV-Ray
docs) is the square root of the sum of the squares of each of the vector's
components, ie:
sqrt (vdot(V, V))
which equals:
sqrt (V.x*V.x + V.y*V.y + V.z*V.z)
in the case, obviously, of a three dimensional vector.
Post a reply to this message
|
|