POV-Ray : Newsgroups : povray.advanced-users : How to address last 2 components of 5-component vectors? : Re: How to address last 2 components of 5-component vectors? Server Time
20 Apr 2024 09:18:36 EDT (-0400)
  Re: How to address last 2 components of 5-component vectors?  
From: Le Forgeron
Date: 7 Jul 2016 11:12:58
Message: <577e717a$1@news.povray.org>
Le 07/07/2016 17:02, Bald Eagle a écrit :
> Sorry, I was hasty and in error.
> The following ought to be correct,
> with a short scene file appended to demonstrate how it works.
> 

Please see http://wiki.povray.org/content/Reference_Talk:Vector_Expressions

x,u,red -> 1st

y,v,green -> 2nd

z,blue -> 3rd

t,filter -> 4th

transmit -> 5th

>> #declare Vector = <1, 2, 3>;
>>
>> individual components can be addressed as:
>>
>> Vector.x, Vector.y, and Vector.z
>> but also as
>> Vector.u, Vector.v, and Vector.z
>>
>> the 4th "TERM" in a 4-term vector is filter, since POV-Ray interprets this as a
>> color expression.
>> so it's addressed as
>> Vector.filter (not Vector.f) or Vector.t
>> and a 5th term is transmit
>> so it's addressed as
>> Vector.transmit (not Vector.t - that would be Term 4)
>>
>>
>> Search terms (for future reference)
>> .x .y .z .t .u .v .filter .transmit
>> 4-component vector
>> 5-component vector
>> 4-term vector
>> 5-term vector
>> 4-term color expression
>> 5-term color expression
> 
> ########################################################################
> 
> #version 3.7;
> global_settings {assumed_gamma 1.0}
> #include "debug.inc"
>   Set_Debug (true)
> 
> #declare Vector = <1, 2, 3, 4, 5>;
> 
> #debug concat( "Vector.x =        ", str(Vector.x, 3, 0), "\n")
> #debug concat( "Vector.u =        ", str(Vector.u, 3, 0), "\n\n")
> #debug concat( "Vector.y =        ", str(Vector.y, 3, 0), "\n")
> #debug concat( "Vector.v =        ", str(Vector.v, 3, 0), "\n\n")
> #debug concat( "Vector.z =        ", str(Vector.z, 3, 0), "\n\n")
> #debug concat( "Vector.t =        ", str(Vector.t, 3, 0), "\n")
> #debug concat( "Vector.filter =   ", str(Vector.filter, 3, 0), "\n\n")
> #debug concat( "Vector.transmit = ", str(Vector.transmit, 3, 0), "\n\n")
> 
>


Post a reply to this message

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