POV-Ray : Newsgroups : povray.general : cracking a sphere : Re: cracking a sphere Server Time
29 Jul 2024 18:16:41 EDT (-0400)
  Re: cracking a sphere  
From: Christian Froeschlin
Date: 18 Nov 2010 15:33:28
Message: <4ce58d98@news.povray.org>
Anthony D. Baye wrote:

> That didn't really work too well, and I tried several variations...

That depends of course on what you want to achieve.

I just gave it a try and came up with the following image:

http://news.povray.org/povray.binaries.images/thread/%3C4ce58bc6%40news.povray.org%3E/

The isosurface definition is given by the code snippet below:


#declare P_WARPED_CRACKLE = pigment
{
   crackle turbulence 0.3 scale 0.04
   warp {spherical dist_exp 0}
   color_map
   {
     [0.00 color rgb 0.00]
     [0.06 color rgb 0.85]
     [0.30 color rgb 0.95]
   }
}

#declare f_warped_crackle = function
{
   pigment {P_WARPED_CRACKLE}
}

#declare f_valleys = function(x,y,z)
{
f_warped_crackle(x/(f_sphere(x,y,z,1)+1),y/(f_sphere(x,y,z,1)+1),z/(f_sphere(x,y,z,1)+1)).red
}

#declare f_implicit = function (x,y,z)
{
   f_sphere(x,y,z,1.8+0.2*f_valleys(x,y,z))
}

isosurface
{
   function { f_implicit(x,y,z) }
   contained_by { box { -2,2  } }
   accuracy 0.001
   max_gradient 10
}


Post a reply to this message

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