|
|
My simple test scene.
Note the vector swizzling.
#version 3.8;
global_settings {assumed_gamma 1}
#declare E = 0.00001;
camera {
//orthographic
//location <image_width/2, image_height/2, -image_width*4>
location <0, 10, -5>/2
right x*image_width/image_height
up y
//sky y
look_at <0, 0, 0>
rotate y*0
}
light_source {<1, 30, -1> rgb 1}
plane {y, 0 pigment {checker}}
#declare BWCM = color_map {
[0 rgb 0]
[1 rgb 1]
}
#declare RGCM = color_map {
[0.0 rgb x]
[0.54 rgb x+y]
[0.54 rgb 0] // black elevation line
[0.55 rgb 0]
[0.55 rgb x+y]
[1.0 rgb y]
}
#declare eps = 0.00001;
#declare r = function {sqrt (x*x + y*y) + eps}
#declare Z = function {(18 * sin (r(x, y, z))/ r(x, y, z))+5}
#declare F = function {pigment {onion color_map {BWCM}}}
cylinder {0, y*2, 0.01 pigment {rgb y}}
height_field {
//function 100 100 {Z (x*8, y*8, z)/25}
function 100 100 {F(x, z, y).red}
scale < 1, 1, -1>
translate <0, 0, 1>
pigment {gradient y color_map {RGCM} }
}
union {
cylinder {0, y*2, 0.01 pigment {rgb y}}
isosurface {
//function {y-(Z (x*8, z*8, 0) - 0)/25}
//function {y-F(x, y, z).red}
function {y-F(x, 0, z).red}
threshold 0
accuracy 0.001
max_gradient 200
//open
all_intersections
contained_by {box {0, 1}}
texture {pigment {gradient y color_map {RGCM}} finish {diffuse 1}}
}
translate -x*2
}
Post a reply to this message
|
|