1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
// This work is licensed under the Creative Commons Attribution 3.0 Unported License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/
// or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View,
// California, 94041, USA.
// Persistence Of Vision raytracer sample file.
// Fun with filter (and other neat tricks).
//
// -w320 -h240
// -w800 -h600 +a0.3
#version 3.7;
global_settings {assumed_gamma 1.0 max_trace_level 5}
#include "shapes.inc"
#include "colors.inc"
camera {
location <0, 3, -4.5>
angle 65
right x*image_width/image_height
look_at <0, 0.4, 0>
}
// Floor, with phoney gray "planks"
plane { y, 0
pigment {
gradient x
color_map {
[0, 0.25 color Gray color Gray]
[0.25, 0.50 color DimGray color LightGray]
[0.50, 0.75 color LightGray color Gray]
[0.75, 1 color Gray color Gray]
}
scale <0.45, 1, 1>
}
finish{ambient 0.1 diffuse 0.7}
}
// Note: Clear = color White filter 1
// A blobby sphere
sphere { <0.25, 1, -1.8>, 1
pigment {
bozo
turbulence 0.5
octaves 1
scale 0.2
color_map {
[0.0 color rgbf<1,0.1,0,0.5>]
[0.2 color rgbf<1,0.1,0,0.5>]
[0.6 color rgbf<1,0.8,0,1> ]
[0.6 color Clear]
[1.0 color Clear]
}
}
finish {ambient 0.15 diffuse 0.7}
}
// A sliced green box
object { UnitBox
rotate 45*y
translate <-3.0, 1, 3>
pigment {
gradient y
color_map {
[0, 0.5 color rgb<0.1,0.6,0> color rgb<0.1,0.6,0> ]
[0.5, 1 color Clear color Clear]
}
scale 0.5
}
}
// A yellow, swirly finite cylinder
object { Disk_Y
translate <3, 1, 4>
pigment {
gradient y
turbulence 2
octaves 1
color_map {
[0, 0.5 color rgb<1,0.7,0> color rgb<1,0.7,0> ]
[0.5, 1 color Clear color Clear]
}
scale 0.5
}
}
light_source { <20, 12, -40> colour White }
|