POV-Ray : Newsgroups : povray.general : [stupid q.] isosurface bounding : Re: [stupid q.] isosurface bounding Server Time
5 Aug 2024 08:28:15 EDT (-0400)
  Re: [stupid q.] isosurface bounding  
From: Rafal 'Raf256' Maj
Date: 27 Oct 2002 13:13:00
Message: <Xns92B4C332DBF10raf256com@204.213.191.226>
"Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote in 
news:Xns### [at] 204213191226

[...]

isosurface {
  function { min(1,max(-1,x*x + y*y - 1))  } 
  contained_by { box { -s, +s } }
  accuracy 0.001   
  max_gradient 4
  pigment { rgb <1,.2,.2> }
  finish { specular 1 roughness 0.03 reflection .5 }
}

Adding min / max (clip) makes this object works for any 's' value.

Maybe clipping function value into range -1 .. +1 (or threshold-e .. 
threshold+e where e is i.e. 1e-3) is a good idea ? Or not ?

AFAIK when using min(+e,max(-e, f(x,y,z) ))
  bigger 'e' values lead to faster rendering, but on the other hand - need 
bigger max_gradient.
  smaller 'e' - vice-versa

Maybe it is worth better researching ? I will try to do it in spare time.

Does anyone have some somplex isosurfaces formulas that he may shere with 
me (for testing purposes) ? TIA :)


-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

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