POV-Ray : Newsgroups : povray.advanced-users : Implicit loops in function(x,y,z) : Re: Implicit loops in function(x,y,z) Server Time
3 Jul 2024 04:23:59 EDT (-0400)
  Re: Implicit loops in function(x,y,z)  
From: slehar
Date: 14 Jul 2008 11:55:00
Message: <web.487b763d26dbfbf0f75a90cb0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> inside a "function" block the language used is
> completely separate and distinct from the SDL. It has nothing to do
> with the SDL.
>
>   Your #declare lines are SDL and thus are *not* parsed as part of your
> function. They are evaluated as SDL.

Do you mean that you cannot #declare temporary variables in a function?

#declare densityfunc = function( px, py, pz) {
  #declare pxVal = px;
  #declare pyVal = py;
  atan2(pyVal, pxVal)
}

You can only use the values directly?

#declare densityfunc = function( px, py, pz) {
  atan2(py, px)
}


Post a reply to this message

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