POV-Ray : Newsgroups : povray.newusers : Two meanings of x? : Re: Two meanings of x? Server Time
30 Jul 2024 22:22:31 EDT (-0400)
  Re: Two meanings of x?  
From: Warp
Date: 5 Aug 2003 18:12:14
Message: <3f302bbe@news.povray.org>
Dave Matthews <mat### [at] dinecollegeedu> wrote:
> Your diagnosis "you seem to expect the #if() statement to execute when the
> function is run" was absolutely true, and the basis for most of my
> confusion.

  All #-commands are interpreted when the function is parsed. An 'x' inside
a #-command (such as #if) is the "parse-time x", that is the vector <1,0,0>.
  After the function has been parsed (and byte-compiled to internal format),
no #-commands are seen anymore. Only what was left after the #-commands
were parsed are seen.
  #if is a parsing-time command. select() is a function which is evaluated
at runtime (meaning when the function is called at parse or render time).

  I know, it's a bit difficult to understand and explain...

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

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