POV-Ray : Newsgroups : povray.newusers : Declaration type : Re: Declaration type Server Time
4 Nov 2024 13:33:36 EST (-0500)
  Re: Declaration type  
From: hughes, b 
Date: 16 Nov 2002 01:14:02
Message: <3dd5e22a$1@news.povray.org>
"Kaveh" <kav### [at] delete_thisfocalimagecom> wrote in message
news:1flqk0y.1vw6141xu6fckN%kaveh@delete_this.focalimage.com...
>
> #declare a = 1;
> #sphere {a.x,a pigment{color rgb a}}
>
> gives the same result, i.e. a.x gives the x component, which is 1, which
> is then re-interpreted as the vector <1,1,1>
>
> Obviously not good style, but is "a" held internally both as a float and
> as a vector? I appreciate any insight into this.

I believe it is interpreted at the place where it is used, as in the
position of a sphere being a vector if given only a float and same for
color. I don't think a declared float is stored as a vector since it would
be an error if used for other things that require a nonvector.


Post a reply to this message

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