POV-Ray : Newsgroups : povray.newusers : Get only x or y or z coordinate of a vector : Re: Get only x or y or z coordinate of a vector Server Time
28 May 2024 19:21:55 EDT (-0400)
  Re: Get only x or y or z coordinate of a vector  
From: Stephen
Date: 3 Dec 2012 13:19:32
Message: <50bced34$1@news.povray.org>
On 03/12/2012 5:14 PM, Warp wrote:
> huiakso <huiakso> wrote:
>> Is there no easy way to do that?
>
>> Something like:
>> #declare P1 = <1, 2, 3>
>> print(P1.y)
>> => 2
>
> Have you actually *tried* to use "P1.y"? Because it should work exactly
> like that.
>
It does work like that. I am using it in my current project.

e.g.

#declare BoxMax = max_extent (Trace_patch_aa_);
...

#while (Num_z <= BoxMax.z)
...


-- 
Regards
     Stephen


Post a reply to this message

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