|
|
Source for image posted to the povray.binaries.images
group:
--
global_settings {
assumed_gamma 2
number_of_waves 9
}
/* 1024 x 768 +a0.3 took an hour and two minutes on a 100 MHz machine. */
/* I think it is the averaged normals, as well as normals in general,
that slow this sort of render down so much. */
#declare ntsc = false;
#declare rseed = seed(14851136);
camera {
location 0
direction <0, 0, 2>
#if (ntsc = true)
right <(640 / 400) * (10/11), 0, 0>
#else
right <(640 / 480), 0, 0>
#end
up <0, 1, 0>
translate <0, 0, -12>
}
#macro rnd_rotate()
rotate <360 * rand(rseed), 360 * rand(rseed), 360 * rand(rseed)>
#end
#macro rnd_translate()
translate <4 - 8 * rand(rseed), 4 - 8 * rand(rseed), 4 - 8 * rand(rseed)>
#end
#macro perturb()
rnd_translate()
rnd_rotate()
#end
#macro rounded_box(roundness)
#local c1 = <roundness - 1, roundness - 1, roundness - 1>;
#local c2 = <1 - roundness, 1 - roundness, 1 - roundness>;
// 8 corners
sphere { c1, roundness }
sphere { <c1.x, c1.y, c2.z>, roundness }
sphere { <c2.x, c1.y, c2.z>, roundness }
sphere { <c2.x, c1.y, c1.z>, roundness }
sphere { c2, roundness }
sphere { <c2.x, c2.y, c1.z>, roundness }
sphere { <c1.x, c2.y, c1.z>, roundness }
sphere { <c1.x, c2.y, c2.z>, roundness }
// bottom
cylinder { c1, <c2.x, c1.y, c1.z>, roundness }
cylinder { <c2.x, c1.y, c1.z>, <c2.x, c1.y, c2.z>, roundness }
cylinder { <c2.x, c1.y, c2.z>, <c1.x, c1.y, c2.z>, roundness }
cylinder { <c1.x, c1.y, c2.z>, c1, roundness }
// top
cylinder { <c1.x, c2.y, c1.z>, <c2.x, c2.y, c1.z>, roundness }
cylinder { <c2.x, c2.y, c1.z>, c2, roundness }
cylinder { c2, <c1.x, c2.y, c2.z>, roundness }
cylinder { <c1.x, c2.y, c2.z>, <c1.x, c2.y, c1.z>, roundness }
// sides
cylinder { <c1.x, c1.y, c1.z>, <c1.x, c2.y, c1.z>, roundness }
cylinder { <c2.x, c1.y, c1.z>, <c2.x, c2.y, c1.z>, roundness }
cylinder { <c1.x, c1.y, c2.z>, <c1.x, c2.y, c2.z>, roundness }
cylinder { <c2.x, c1.y, c2.z>, <c2.x, c2.y, c2.z>, roundness }
// middles
box { <-1, c1.y, c1.z>, <1, c2.y, c2.z> }
box { <c1.x, -1, c1.z>, <c2.x, 1, c2.z> }
box { <c1.x, c1.y, -1>, <c2.x, c2.y, 1> }
#end
#macro one_rnd_normal()
#local hh = int(5 * rand(rseed));
#switch(hh)
#case (0)
bozo
turbulence 1.1
bump_size 0.3
scale 1/5
#break
#case (1)
granite
bump_size 0.1
#break
#case (2)
ripples
frequency 100
bump_size 0.3
scale 40
#break
#case (3)
crackle
bump_size -0.3
#break
#else
agate
bump_size 0.1
scale 1/2
#end
perturb()
#end
#macro rnd_normal()
#if (rand(rseed) > 0.6)
normal {
average
normal_map {
[ one_rnd_normal() ]
[ one_rnd_normal() ]
}
}
#else
normal { one_rnd_normal() }
#end
#end
#macro rnd_blue_color()
// purplish blue or cyanish blue?
#if (rand(rseed) > 0.333) // cyanish
#local xx = <0, 0.5 * rand(rseed), 1>;
#else // purplish
#local xx = <(0.3 * rand(rseed)), 0, 1>;
#end
#local sat = 0.3 + 0.4 * rand(rseed); // lower sat - closer to white
#local xx = (xx * sat) + ((1 - sat) * <1, 1, 1>);
xx
#end
#declare cc = 0;
#while (cc < 80)
union {
rounded_box(0.2 + 0.3 * rand(rseed)) // makes a box 1 unit on a side
rnd_rotate()
translate <8 - 16 * rand(rseed), 6 - 12 * rand(rseed), 20 * rand(rseed)>
pigment {
rgb rnd_blue_color()
}
finish { ambient 0.5 diffuse 0.5 }
// #if (rand(rseed) > 0.2)
rnd_normal()
// #end
}
#declare cc = cc + 1;
#end
light_source {
0
color rgb 0.5
area_light <1, 0, 0>, <0, 1, 0>, 5, 5 adaptive 1
scale 1000
rotate z*-5
translate <0, 0, -10000>
}
light_source {
0
color rgb 0.5
area_light <1, 0, 0>, <0, 1, 0>, 5, 5 adaptive 1
rotate z*7
scale 300
translate <2000, 2000, -2000>
}
/* actual end of this file */
Post a reply to this message
|
|