POV-Ray : Newsgroups : povray.general : A macro that drops a vector-- what's the syntax again? : Re: A macro that drops a vector-- what's the syntax again? Server Time
7 Sep 2024 18:09:45 EDT (-0400)
  Re: A macro that drops a vector-- what's the syntax again?  
From: Zeger Knaepen
Date: 10 Nov 2005 05:56:22
Message: <43732756$1@news.povray.org>
"kurtz le pirate" <kur### [at] yahoofr> wrote in message 
news:kurtzlepirate-B61563.07015210112005@news.povray.org...
> In article <4372b765@news.povray.org>,
>  "Greg M. Johnson" <p t e r a n d o n @ 
>  thecommononethatstartswithY.com> wrote:
> 
> ::I cannot get the following code to work:
> ::
> :://-----------------------------
> ::#macro sign(a)
> ::#if (a<0)
> ::        (-a)
> ::#else
> ::        (a)
> ::#end
> ::#end
> 
> ... abs() already exist in pov

what's abs() got to do with sign(), except that you can make sign() with 
sign(x)=x/abs(x) ?

cu!
-- 
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message

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