POV-Ray : Newsgroups : povray.off-topic : povray function thingy(a,b,c,d) : Re: povray function thingy(a,b,c,d) Server Time
10 Oct 2024 23:18:03 EDT (-0400)
  Re: povray function thingy(a,b,c,d)  
From: Greg M  Johnson
Date: 24 Jan 2008 23:29:52
Message: <479965c0@news.povray.org>
Nicolas Alvarez wrote:

> Greg M. Johnson escribió:
>> If a>b, it's c, else it's evaluated as d.
>> 
>> I cannot find this function. what's it' called?
> 
> select?

Thanks.
I went and tried a #macro anyway, and it doesn't work.



#macro hiloer(jay)
#if (jay<0.5)
        (0+0.5*(1-sqrt(1-jay*jay*4))
#else
(0+jay)
#end
#end




#declare n=0;
#while (n<1)

#declare aya=(hiloer(n)):
        sphere{<n,3*n*n-2*n*n*n   ,3>,0.01 pigment{red 1} finish{ambient 1}}
        sphere{<n,0.5+0.5*cos(pi+n*pi),3>,0.01 pigment{green 1} finish{ambient 1}}
        sphere{<n,sqrt(1-n*n)       , 3>,0.01 pigment{rgb 1} finish{ambient 1}}
        sphere{<n,(hiloer(n))        , 3>,0.01 pigment{rgb 1} finish{ambient 1}}
 #declare n=n+0.001;
#end


Post a reply to this message

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