|
|
#version 3.6;
#include "colors.inc"
#declare Photons = on;
#declare Radiosity = on;
global_settings {
assumed_gamma 1.0
#if (Radiosity)
radiosity {
pretrace_start 0.08
pretrace_end 0.04
count 35
nearest_count 5
error_bound 1.8
recursion_limit 2
low_error_factor .5
gray_threshold 0.0
minimum_reuse 0.015
brightness 1
adc_bailout 0.01/2
}
#end
#if (Photons)
photons {
count 100000
jitter 1.0
}
#end
}
// ----------------------------------------
camera {
location <0.0, 0.0, -3>
direction 1.5*z
right x*image_width/image_height
look_at <0.0, -0.1, 0.0>
}
union {
#local lc = 6;
#while (lc > 0)
light_source {
<0, 0, 0>
color rgb <1, 1, 1>*(1/3)
translate 4*x
rotate 360/6 * z
}
#local lc = lc - 1;
#end
translate <0, 0, -9>
rotate 75*y
}
/*
light_source {
<0, 0, 0>
color rgb <1, 1, 1>
translate <-15, 6, -10>
}
*/
light_source {
<0, 0, 0>
color rgb <1, 1, 0.8>*0.2
translate <20, 2, -3>
}
// ----------------------------------------
// mostly arbitrary sky_sphere
sky_sphere {
pigment {
bozo
color_map {
[0.0 color rgb <0.7,0.7,1.0>]
[0.3 color rgb <1, 1, 1>]
[0.8 color rgb <0, 0, 0>]
[1.0 color blue 0.5]
}
scale 0.5
}
}
plane {
z, 0.101
texture {
pigment {
rgb 1
}
}
}
#macro pillbutton (theColor)
merge {
sphere {
<0, 0.1, 0>, 0.1
}
sphere {
<0, -0.1, 0>, 0.1
}
cylinder {
<0, -0.1, 0>,
<0, 0.1, 0>, 0.1
}
texture {
pigment {
rgbt <1, 1, 1, 1>
}
finish {
specular 0.6
roughness 0.01
diffuse 0.5
phong 0.5
phong_size 20
reflection {
0.1, 0.3
fresnel on
exponent 1
}
}
}
interior {
ior 1.63
fade_power 1003
fade_distance 0.0225
fade_color color theColor
}
photons {
target
reflection on
refraction on
collect
}
}
#end
// cols is not really columns
// rows is not really rows
// they are just a starting point
// for iteration
#local cols = -1;
#local rows = 1;
#local s1 = seed(41313);
#local rot = on;
union {
#while (rows > -1.5 )
#while (cols < 1.5 )
#if (rand(s1) > 0.2)
object {
// decide if blue or random color
#if (rand(s1) > 0.9)
#local rot=off;
pillbutton(<0.2, 0.9, 1>)
#else
#local rot=on;
pillbutton(<0.5+(rand(s1)*0.5), 0.5+(rand(s1)*0.5),
0.5+(rand(s1)*0.5)>)
#end
// only gets rotated if not blue
#if (rot)
rotate <0, 0, 180*rand(s1)>
#end
// set up slight random translation
#if (rand(s1) > 0.5)
#local signx = -1;
#else
#local signx = 1;
#end
#if (rand(s1) > 0.5)
#local signy = -1;
#else
#local signy = 1;
#end
#local modx = rand(s1) * signx * 0.1;
#local mody = rand(s1) * signy * 0.1;
translate <cols+modx, rows+mody, 0>
}
#end
#local cols = cols + 0.5;
#end
#local rows = rows - 0.5;
#local cols = -1;
#end
}
Post a reply to this message
|
|