|
|
_Light_Beam_ wrote:
> Can somebody help me to do this ?! I've uded a cylindrical pigment to make
> it but I don't know how to make it softly (soft edges of the crater) and
> combine with anothe function to replace crater's edge by rocks or collapsed
> edge... Thanks
You can try modellling the crater with a spline function and use it like:
function {
y - f_spline_crater(f_r(x, 0, z)).x
}
Christoph
--
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 2 Sep. 2003 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
|
|
Wasn't it _Light_Beam_ who wrote:
>Can somebody help me to do this ?! I've uded a cylindrical pigment to make
>it but I don't know how to make it softly (soft edges of the crater) and
>combine with anothe function to replace crater's edge by rocks or collapsed
>edge... Thanks
I'd start from a mathematical function of two variables that looked
something like this (view with fixed width font)
_--_
____________________- -________
and sweep it around the origin to create the crater shape.
I'd then add noise, and multiply the noise by the function itself, so
that the flat areas, where the function is close to zero, experience
little noise effect, but the crater rim experiences the full effect of
the noise.
Here's something you might use as a starting point.
It would probably look better with several noise functions at different
scales, with some small scale noise affecting the flat bits as well.
camera { location <4, 30, -30> look_at <0, 0, 0>}
light_source {<-100,200,-100> colour rgb 1}
#include "functions.inc"
#declare R = 20; // radius of contained by sphere
#declare Size=1/8; // crater radius adjuster
#declare Sharp=40; // sharpness adjuster
#declare Amp = 2; // amplitude adjuster
#declare NS = 0.2; // Noise inverse scale
#declare NA = 1.0; // Noise amplitude
// function of two variables that looks like a bump
#declare F = function {pow(sin(x*Size),Sharp)*Amp}
isosurface {
// sweep it found the origin
function { y-F(sqrt(x*x+z*z),y,z)
// add some noise to the hig places
-f_noise3d(x*NS,0,z*NS)*NA*F(sqrt(x*x+z*z),y,z)
}
open
max_gradient 2
contained_by{sphere{0,R}}
pigment {rgb 1}
}
//--- end ---
If you want a crater with a central peak, you could start by changing
the "sin" into a "cos" and doubling the Size parameter.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|