POV-Ray : Newsgroups : povray.general : Isosurface help : Re: Isosurface help Server Time
30 Jul 2024 12:32:01 EDT (-0400)
  Re: Isosurface help  
From: Kenneth
Date: 22 Jan 2009 17:00:01
Message: <web.4978eb31fb628f71f50167bc0@news.povray.org>
Here's another version, using the isosurface 'smooth transits' idea at
"2.3.3.3.6 Combining isosurface functions" in the docs.  I also came up with a
'wrinkly' function--*trying* to get the look of wrinkly, sagging skin--but it
probably looks more like melted ice cream.  Oh well!

The max_gradient probably isn't high enough, but looks OK as-is.

Ken W.

----------

#declare  P = function {x*x + y*y + z*z - 1}

#declare  P1 = function {P(x*2,y*(1.05-y/6),z*2)}
#declare  P2 = function {P(x*4+1,y*4,z*4+2)}

// I like to specify my own color_map for pigment functions, for more
// control; the default ones look odd sometimes.
#declare my_color_map_1 =
color_map{
 [0.0 rgb 0]
 [1.0 rgb 1]
 }

#declare wrinkly_function =
function{
 pigment{
  spotted
  scale .2*<1,.1,1>
  sine_wave
  color_map {my_color_map_1}

  scale 4
  warp{turbulence .18*<1,1,1> omega .1}
  scale 1/4

  scale 10
  warp{turbulence .18*<.5,1,1> omega .1}
  scale 1/10

  scale .7*<.5,2,1>
  }
 }

isosurface {
        function {
        (1 + .01)
 - pow(.01,P1(x,y,z)*1)
 - pow(.01,P2(x,y,z)*1)
 + wrinkly_function(x,y,z).gray*.23
                 }

        accuracy 0.001
        max_gradient 50
        contained_by{sphere{<0,0,0>,1.2}}
        pigment {rgbt <0,1,0>}

        scale 2.5
           }


Post a reply to this message

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