|
|
"Tom Melly" <pov### [at] tomandlucouk> wrote in message
news:417ff90e@news.povray.org...
>
> I'll have a play and try and post a demo later on...
Not complete or perfect by any means...
#version 3.6;
#include "colors.inc"
#include "functions.inc"
global_settings {
assumed_gamma 1.0
}
// ----------------------------------------
camera {
location <0.0, 10, -40.0>
look_at 0
}
light_source {
<0, 0, 0> // light's position (translated below)
color rgb <1, 1, 1> // light's color
translate <-30, 30, -30>
}
// ----------------------------------------
// create a isosurface object - the equipotential surface
// of a 3D math function f(x, y, z)
#declare NScale = 3; // increasing this will make the noise busier (i.e.
more noise per inch! a sort of noise freq.)
#declare NMax = 0.75; // decreasing this will make the noise noisier (i.e.
more extreme - a sort of noise magnitude?)
#declare NDropoff = 0.1; //decreasing this will make noise drop-off
shallower (i.e. it will remain turbulent further away from x=0,z=0)
#declare RFreq = 2;
#declare RAmp = 5;
#declare fn_A = function(x,y,z) {
( y*(pow(x,2) + pow(z,2)) - 1 ) // basic shape
+ ( f_noise3d(x*NScale,y*NScale,z*NScale) * (1/
max(pow(x*NDropoff,2)+pow(z*NDropoff,2),NMax) ) ) // noise
+ ( sin(pow(x/RFreq,2) +
pow(z/RFreq,2))*RAmp*min(pow(x/10,2)+pow(z/10,2),1) ) // ripples
}
isosurface {
function { fn_A(x, y, z) } // alternative declared function
contained_by { box { <-20,-1, -20>,<20,20,20> } } // container shape
accuracy 0.001 // accuracy of calculation [0.001]
max_gradient 300 // maximum gradient the function can
have [1.1]
max_trace 5 // maybe increase for use in CSG [1]
pigment{Green}
}
Post a reply to this message
|
|