POV-Ray : Newsgroups : povray.unofficial.patches : trace() doesn't work with method 2 isosurfaces? : trace() doesn't work with method 2 isosurfaces? Server Time
2 Sep 2024 00:13:37 EDT (-0400)
  trace() doesn't work with method 2 isosurfaces?  
From: Warp
Date: 25 Jul 2000 11:09:14
Message: <397dad9a@news.povray.org>
I faintly remember that someone had problems with trace() and isosurfaces.
I paid no much attention to that thread, but now I have the same problem.

  I have made the case as simple as possible. It seems that trace() doesn't
work with isosurfaces which use method 2.
  In the following code the trace() with the real torus returns <-2,1,0>
while the trace() with an equivalent isosurface returns <0,0,0>. If you
change the method to 1, it will return (approximately) the same:

#version Unofficial MegaPov 0.5;

$R1=2;
$R2=1;

$Torus1 = torus { R1, R2 }

$Torus2 =
  isosurface
  { function
    { sqrt(sqr(sqrt(sqr(x)+sqr(z))-R1)+sqr(y))-R2
    }
    method 2
    contained_by { sphere { 0,R1+R2 } }
  }

$P1 = trace(Torus1, <-R1,R2*2,0>, -y);
$P2 = trace(Torus2, <-R1,R2*2,0>, -y);

#debug concat("<",str(P1.x,0,-1),",",str(P1.y,0,-1),",",str(P1.z,0,-1),">\n")
#debug concat("<",str(P2.x,0,-1),",",str(P2.y,0,-1),",",str(P2.z,0,-1),">\n")


  In my scene the isosurface is more complex and seems to work well only
with method 2 (method 1 causes holes in the surface).

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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