POV-Ray : Newsgroups : povray.binaries.images : Exponential blobs : Re: Exponential blobs Server Time
14 Aug 2024 13:21:33 EDT (-0400)
  Re: Exponential blobs  
From: John Williamson
Date: 13 Oct 2002 17:46:39
Message: <3DA9EA7F.CA390ACB@dcs.gla.ac.uk>
Hi again,

> I'll have a go at reproducing something
> similar to the scene you sent with exponential blobs.

Right, just stuck in the values from the scene you provided (doesn't 
necessarily make sense, but still), here's the result. Rendered in
40s on 1.4Ghz Athlon. Source below.

global_settings { assumed_gamma 1 }

camera { location <0,12,0> look_at 0 }

light_source { <100,300,-100> 1 }                                    

#declare fn_gauss = function(x,y,z,r) { - exp(-(x*x + z*z + y*y)/r) }
#declare fn_blob = function(x,y,z) { (fn_gauss(x+2, y, z+1, 3) * 0.6 + 
                                     fn_gauss(x-3, y, z, 3) * 0.7 + 
                                     fn_gauss(x-1, y, z+2, 2) * 0.9)/4 }
#declare i = 0;
#while(i < 3)
        
  isosurface {
                function { fn_blob(x, y, z)  }        // alternative
declared function
                contained_by { box { -5, 5 } }  // container shape
                threshold -0.095 + i*0.02
                accuracy 0.01                      // accuracy of
calculation [0.001]
                max_gradient 0.3                      // maximum
gradient the function can have [1.1]

                pigment { rgb 1 }
                finish { phong 0.9 diffuse 0.8 }
                
                scale 0.6
                rotate 90*y
                translate (i*4-4)*x
        }
        
        #declare i = i + 1;
#end


sky_sphere {
        pigment {
                planar
                color_map {
                        [0 rgb <0.1,0.1,0.5> ]
                        [1 rgb 1 ]
                }
        }
}


Post a reply to this message


Attachments:
Download 'gausstest.jpg' (12 KB)

Preview of image 'gausstest.jpg'
gausstest.jpg


 

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