POV-Ray : Newsgroups : povray.advanced-users : Square roots of negative numbers in isosurfaces? : Re: Square roots of negative numbers in isosurfaces? Server Time
30 Jul 2024 06:20:57 EDT (-0400)
  Re: Square roots of negative numbers in isosurfaces?  
From: david sharp
Date: 10 Jan 2000 10:55:10
Message: <387a00de@news.povray.org>
Greg M. Johnson <gre### [at] my-dejanewscom> wrote in message
news:3879E51F.77B9A241@my-dejanews.com...
> How "should" an isosurface respond when there is an undefined region of
> space?
>
> I just ran something like
>         function{noise3d(x^0.5/constant , y/constant , z/constant}
> .  The result is symmetric about the x-axis!
>
> Is this an algorithm mistake?

*I* wouldn't want to get an error every time I had an isosurface
do (-1)^.5,  but I think this is a very debatable topic.
What would you like the program to do in this case?

The isosurface stuff converts x to absolute value of x
before trying to use the ^. This is just to avoid many floating
point errors.  The isosurface code does the same conversion
before applying sqrt() or ln().
Personally I think its OK, (but perhaps the program should put out
a warning). If you look at isosurface scenes posted in these newsgroups,
you will find a lot of square roots and logs of negative numbers being done,
and a lot of this is probably being done completely oblivious to the
mathematical inconsistency.


Post a reply to this message

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