POV-Ray : Newsgroups : povray.general : Extracting values from predefined vectors : Re: Extracting values from predefined vectors Server Time
13 Aug 2024 21:24:23 EDT (-0400)
  Re: Extracting values from predefined vectors  
From: Nieminen Mika
Date: 12 Jun 1998 10:11:09
Message: <6lrctt$sct$1@oz.aussie.org>
Greg Sanders <gvi### [at] oraclerenonvus> wrote:
: What?!  You mean read the documentation?!

  That's always a good idea.

  Section 7.1.4.3 says:

You may use the dot operator to extract a single component from a vector.
Suppose the identifier Spot was previously defined as a vector. Then Spot.x is
a float value that is the first component of this x, y, z vector. Similarly
Spot.y and Spot.z reference the 2nd and 3rd components. If Spot was a two
component UV vector you could use Spot.u and Spot.v to extract the first and
second component. For a 4D vector use .x, .y, .z and .t to extract each float
component. The dot operator is also used in color expressions which are
covered later.

-- 
                                                              - Warp. -


Post a reply to this message

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