|
![](/i/fill.gif) |
"Cousin Ricky" <rickysttATyahooDOTcom> wrote:
> For a while, this one had me wondering if I'd made a disastrous error in
> roundedge.inc.
>
> Code excerpt:
> ____________________________________________________________________
>
> #include "functions.inc"
> #include "roundedge.inc" //From lib.povray.org; defines RE_fn_Blob2()
>
> #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
>
> #declare Final_shape = isosurface
> { function { max (Basic_shape (0.5, 0.3), -Basic_shape (0.4, 0.4)) }
> max_gradient 1/0.3
> contained_by { box { -<1, 1, 0>, <1, 1, 0.5> } }
> }
> ____________________________________________________________________
>
> POV-Ray veterans and C programmers will spot my error immediately.
>
> However, the first newbie to post what I did wrong gets a 15% discount off
> POV-Ray 3.7.0. (You do not need to know what RE_fn_Blob2() does to figure it
> out.)
It seems to me that it should be verified that a number be tested
to be positive before taking the square root out of it.
Post a reply to this message
|
![](/i/fill.gif) |