|  |  | After seeing the animation in p.b.a, you can of course
try to generate interesting structure by exploiting pattern
functions based, e.g. on crackle.
Here is a sample how you can wrap a pattern around a sphere
and control locations where it should appear:
// This basically defines a repeating pattern
// of spherical cones wrapped around a sphere
#declare f_obj_depth = function
{
   pattern
   {
     spherical
     translate 1
     warp {repeat 2*x} warp {repeat 2*y}
     scale <0.005,0.005,1>
     warp {spherical dist_exp 0}
   }
}
// Some sort of bozo continents
#declare f_placement = function
{
   pattern
   {
     bozo
     translate 1
     scale <0.1,0.1,1>
     warp {spherical dist_exp 0}
   }
}
#declare f_placement_clipped = function
{
   select(f_placement(x,y,z)-0.5,0,2*f_placement(x,y,z)-1)
}
#declare f_planet  = function(x,y,z)
{
   f_sphere(x,y,z,1+0.04*f_placement_clipped(x,y,z)*f_obj_depth(x,y,z))
}
isosurface
{
   function { f_planet(x,y,z) }
   contained_by { box {<-2,0,-2>,<2,2,2>} }
   accuracy 0.001
   max_gradient 2
   pigment {color White}
   scale 2
}
Post a reply to this message
 |  |