POV-Ray : Newsgroups : povray.binaries.images : Cracked Sphere (~41kbbu) : Re: Cracked Sphere (~41kbbu) Server Time
4 Nov 2024 13:00:34 EST (-0500)
  Re: Cracked Sphere (~41kbbu)  
From: Richard Dault
Date: 12 Sep 2000 12:14:11
Message: <39be5653@news.povray.org>
They are isosurfaces.  It's a marble function pattern removed from a sphere.
That's why I'm surprised the crack doesn't appear on the inside.

Here's a snippet of code:

#declare ball = function { x*x + y*y + z*z - 2*2 }
#declare crack = function {
    pigment { marble turbulence .7
      color_map {[0 rgb 1][.5 rgb 1][.5 rgb 0][.505 rgb 0][.505 rgb 1][1 rgb
1]}
      scale 4
    }
  }

isosurface {
  function {
    ball(x,y,z)
    - crack(x,y,z)
  }
  max_trace 3
  method 2
  accuracy 0.001
  threshold 0
  max_gradient 20
  contained_by { sphere { 0 2.3 } }
  texture { pigment { rgbf <.95,.95,1,.95> } finish { reflection .1
roughness .001 specular .8 ambient 0 diffuse 0 } }
  interior { ior 1.5 }
}


Post a reply to this message

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