POV-Ray : Newsgroups : povray.general : Still making newbie mistakes : Re: Still making newbie mistakes Server Time
29 Jul 2024 10:29:16 EDT (-0400)
  Re: Still making newbie mistakes  
From: Le Forgeron
Date: 1 Apr 2013 16:46:05
Message: <5159f20d$1@news.povray.org>
Le 01/04/2013 21:14, Sohcahtoa nous fit lire :
> "Cousin Ricky" <rickysttATyahooDOTcom> wrote:
>> Christian Froeschlin <chr### [at] chrfrde> wrote:
>>> Cousin Ricky wrote:
>>>
>>>  > -Basic_shape (0.4, 0.4)
>>>
>>> I suspect this was intended to be the negative value
>>> of Basic_shape(0.4,0.4), while it may turn out to only
>>> change 1-sqrt to -1-sqrt.
>>
>> Bingo.  But you're not a newbie, so the discount goes to the first newbie who
>> explains why this happens and how to fix it.
> 
> Macros are expanded inline.  That is to say, the body of the macro is
> substituted for the macro call.
> 
> You could fix it by either putting a call to the macro in parentheses, or
> putting parentheses around the math in the macro definition, like this:
> 
> #macro Basic_shape (Rpipe, Rsaddle)
>   (1 - sqrt
>   ( RE_fn_Blob2 (f_sphere (0, y, z, Rpipe), Rsaddle)
>   + RE_fn_Blob2 (f_sphere (x, 0, z, Rpipe), Rsaddle)
>   - RE_fn_Blob2 (f_sphere (x, y, z, Rpipe), Rsaddle)
>   ))
> #end
> 
> 
> 
> 
IMHO, You would qualify as newbie, no cigar. What about the definition
of RE_fn_Blob2 ? no parentheses either ?

would you have the discount ? that's an open question.

And no offence ever intended. keep smiling.


Post a reply to this message

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