POV-Ray : Newsgroups : povray.unofficial.patches : Trouble with MechSim fields : Re: Trouble with MechSim fields Server Time
18 Jun 2024 08:12:23 EDT (-0400)
  Re: Trouble with MechSim fields  
From: Christoph Hormann
Date: 20 Aug 2004 03:33:52
Message: <4125a960@news.povray.org>
ssssmemyself wrote:
> [...]
> #declare Fn_Vector = function(x,y,z) {
>   Vector_Function(
>     function{0}
>     function{
>       #if (y>RADIUS)
>         0
>       #else
>         #if (y<-RADIUS)
>           9.81*4/3
>         #else
>           9.81*pi*(((y-r)*r*r-1/3*pow(y-r,3))-(-r*r*r-1/3*pow(-r,3)))
>         #end
>       #end
>     }
>     function{0}
>   )
> }

You have some basic misunderstanding of how use of #if in functions work 
- you can not do render time conditionals this way - use select() for this.

-- 
Christoph Hormann
http://www.tu-bs.de/~y0013390/


Post a reply to this message

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