|
|
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
|
|