POV-Ray : Newsgroups : povray.unofficial.patches : (simple?) Isosurface patch request : Re: (simple?) Isosurface patch request Server Time
28 Sep 2024 17:56:04 EDT (-0400)
  Re: (simple?) Isosurface patch request  
From: Samuel Benge
Date: 14 Aug 2004 15:12:46
Message: <411E424C.9020102@hotmail.com>
Christoph Hormann wrote:

> Samuel Benge wrote:
> 
>>
>> This is what's really frustrating me.... I know the patch is better 
>> when it comes to accuracy. With the 'official' isosurface, we have to 
>> use accuracy values which are MUCH SMALLER than the needed 'grain 
>> size', or resolution of the isosurface to rid ourselves of the black 
>> dots.
>>
> 
> You should really better show an example.  Black dots are nearly always 
> an indication of unsuccessful root finding and then this patch would not 
> help as explained.
> 
> Christoph


Okay, the example image has been uploaded to p.b.i. I gave three 
examples in png format, each one having a different accuracy value. 
Also, the isosurface has smooth and rough surfaces combined for obvious 
reasons. The code for the example is below. You might want to uncomment 
the max_gradient and use very high values, to conclude the artifacts 
shown are not related to max_gradient. Also, I encourage both you and 
Wolgang to try this in the patched version. I'd like to see the results.

-Sam

// Begin Code

global_settings{
  assumed_gamma 1
}

#default{ finish{ ambient 0 } }

camera{
  fisheye
  right x*.5 up y*.5
  //right x*.5*1.33 up y*.5
  location< 0, 20, -30 >
  look_at 0
  angle 14
}

background{ rgb<.3 .4 .5> }

light_source{<1,2,-.95>*100000,<1 1 .8>*2 }

#declare tex=
function{
  pattern{
   granite
  }
}

isosurface {
  function{
   min(
    max( // cube
     abs(x),
     abs(y),
     abs(z)
    )-1,
    max(
     sqrt(y*y+z*z)-.75, // cylinder
     abs(x)-2
    )+tex(x,y,z)/10 // rough surface
   )
  }
  accuracy .05 // .01 // .001
  //max_gradient 100
  evaluate 0.6, 1.8, 0.95
  contained_by{
   box{
    <-2.1,-1.1,-1.1>,
    <2.1,1.1,1.1>
   }
  }
  pigment{ rgb 1 }
  rotate y*35
}


Post a reply to this message

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