POV-Ray : Newsgroups : povray.general : macro or include file to make rocks ?? : Re: macro or include file to make rocks ?? Server Time
31 Jul 2024 00:33:01 EDT (-0400)
  Re: macro or include file to make rocks ??  
From: Mike Williams
Date: 25 Jan 2008 18:37:07
Message: <BWg7HEKeDnmHFwGe@econym.demon.co.uk>
Wasn't it john who wrote:
>I want to make a base for a sculpture.
>
>I want to have a stone with the top surface polished and the sides
>very rough as if they had just been excavated from a quarry.
>
>Does anyone know of a macro or include file that can generate
>something like this.  Ideally I would like to be able to define the
>dimensions and also the roughness of the vertical surfaces while
>leaving the top flat and polished.

Isosurfaces are good for rocks. Perhaps something like this:

#declare F=function{pigment{
  agate
  scale 0.5
  }
}
isosurface {
        function { x*x +z*z -1 + F(x,y,z).grey*0.3 }
        max_gradient 3.2
        contained_by{box {<-1,-0.2,-1>,<1,0.2,1>}}
        pigment {rgb .9}
}


Or this:

#declare F=function{pigment{
  agate
  scale 0.3
  }
}
isosurface {
  function { f_rounded_box(x,y,z,0.2,0.7,0.2,0.7)+F(x,y,z).grey*0.1 }
        max_gradient 10
        contained_by{box {<-1,-0.11,-1>,<1,0.11,1>}}
        pigment {rgb .9}
        finish {phong 0.2 phong_size 10}
}



-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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