POV-Ray : Newsgroups : povray.binaries.images : q on isodonuts : Re: q on isodonuts Server Time
1 Oct 2024 22:28:29 EDT (-0400)
  Re: q on isodonuts  
From: Tor Olav Kristensen
Date: 10 Jul 2000 06:46:15
Message: <3969A905.12D25650@online.no>
hall wrote:
> 
> Well, I have been playing around with isosurface donuts, and found something
> puzzling.  The attached image (source code below) is of three isosurface
> torii (donuts) that have, so far as I can tell, mathematically equivalent
> functions.  Can anyone see why these functions produce different results?
> ...
> #declare major=+1.00;
> ...
> #declare a = function{sqrt((x^2)+(z^2))-major}
> ...
> #declare a = function{abs(sqrt((x^2)+(z^2))-major)}
> ...
> #declare pre_a = function{sqrt((x^2)+(z^2))-major}
> #declare a = function{abs(pre_a)}
> ...

The first and second expressions are mathematically 
NOT equivalent:

sqrt(x^2 + z^2) - major  <>  abs(sqrt(x^2 + z^2) - major)


But, as far as I can see, the second and the last 
expressions are equivalent and should produce the 
same results (if my assumptions about function 
and isosurfaces are right).


A tip for further debugging:
You might try to render each of the isosurfaces 
independently, with ALL the code for the other 
two commented out, to see if the results are 
still the same.


Tor Olav
--
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


Post a reply to this message

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