POV-Ray : Newsgroups : povray.advanced-users : vlength( ) : Re: vlength( ) Server Time
30 Jul 2024 02:17:57 EDT (-0400)
  Re: vlength( )  
From: Jetlag
Date: 9 Jun 2000 00:46:16
Message: <39407698@news.povray.org>
> 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.

A vector is really a direction and a length (scalar), vlength just returns
the length.

In POV however, a vector is represented as a point in space by XYZ
coordinates, the direction and length aren't very obvious (to most). The
direction is considered the direction from the origin (0,0,0) to the vector
point, and the length of the vector is the length from the origin to vector
point. I think vlength(x,y,z) is just sqrt(x*x+y*y+z*z).

If I'm wrong someone please correct me.


Post a reply to this message

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