1// This work is licensed under the Creative Commons Attribution 3.0 Unported License. 2// To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ 3// or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, 4// California, 94041, USA. 5 6// Persistence Of Vision raytracer sample file. 7// 8// -w320 -h240 9// -w800 -h600 +a0.3 10 11//===================== RENAISSANCE PATIO ===================================== 12 13//===================== RADIANCE AND ENVIRONMENT SETTINGS ===================== 14#version 3.7; 15#declare Rad_Quality = 2; 16 17global_settings { 18 assumed_gamma 1.0 19 20#switch (Rad_Quality) 21 #case (1) 22 radiosity { // --- Settings 1 (fast) --- 23 pretrace_start 0.08 24 pretrace_end 0.02 25 count 50 26 error_bound 0.5 27 recursion_limit 1 28 } 29 #break 30 #case (2) 31 radiosity { // --- Settings 2 (medium quality) --- 32 pretrace_start 0.08 33 pretrace_end 0.01 34 count 120 35 error_bound 0.25 36 recursion_limit 1 37 } 38 #break 39 #case (3) 40 radiosity { // --- Settings 3 (high quality) --- 41 pretrace_start 0.08 42 pretrace_end 0.005 43 count 400 44 error_bound 0.1 45 recursion_limit 1 46 } 47 #break 48 #case (4) 49 radiosity { // --- Settings 4 (medium quality, recursion_limit 2) --- 50 pretrace_start 0.08 51 pretrace_end 0.005 52 count 350 53 error_bound 0.15 54 recursion_limit 2 55 } 56 #break 57 #end 58 59} 60 61fog { 62 fog_type 2 63 fog_alt 1.3 64 fog_offset 0 65 color rgb <0.7, 0.8, 0.9> 66 distance 800 67} 68 69light_source {<1000, 10000, -15000> color rgb <1.0, 0.9, 0.78>*2.3} 70 71sphere { // --- Sky --- 72 <0, 0, 0>, 1 73 texture { 74 pigment { 75 gradient y 76 color_map { 77 [0.0 color rgb < 1.0, 1.0, 1.0 >] 78 [0.3 color rgb < 0.5, 0.6, 1.0 >] 79 } 80 } 81 finish { diffuse 0 #if (version < 3.7) ambient 1 #else emission 1 #end } 82 } 83 scale 10000 84 hollow on 85 no_shadow 86} 87 88//===================== THE SCENERY ITSELF ==================================== 89 90#include "colors.inc" 91 92camera { location <500,150,0> 93 angle 65 // direction z 94 right x*image_width/image_height 95 look_at <0,150,320> 96 } 97 98plane {y,0 pigment {color rgb <0.776,0.706,0.706>}} 99 100#declare Arch_01 = 101union { 102 difference { 103 cylinder {<-20,0,0>,<20,0,0>,140} 104 cylinder {<-21,0,0>,<21,0,0>,130} 105 torus {130 2 rotate z*90 translate x*20} 106 torus {130 2 rotate z*90 translate x*-20} 107 } 108 difference { 109 cylinder {<-18,0,0>,<18,0,0>,130} 110 cylinder {<-21,0,0>,<21,0,0>,125} 111 } 112 torus {139 1 rotate z*90 translate x*20} 113 torus {136 1 rotate z*90 translate x*20} 114 torus {139 1 rotate z*90 translate x*-20} 115 torus {136 1 rotate z*90 translate x*-20} 116clipped_by {plane {y,0 inverse}} 117} 118 119#macro SphereBox (Radius) 120 #local SpRad = sqrt (Radius*Radius + Radius*Radius); 121 intersection { 122 sphere {0,SpRad} 123 box {<-Radius,0,-Radius>,<Radius,Radius,Radius>} 124 } 125#end 126 127#declare Column_01 = union { 128 box {<-40,0,-40>,<40,50,40>} 129 box {<-35,50,-35>,<35,60,35>} 130 cylinder {<0,60,0>,<0,66,0>,28} 131 torus {28 3 translate y*63} 132 difference { 133 cylinder {<0,66,0>,<0,70,0>,25} 134 torus {25 2 translate y*68} 135 } 136 cylinder {<0,70,0>,<0,74,0>,25} 137 torus {25 2 translate y*72} 138 cylinder {<0,74,0>,<0,76,0>,25} 139 sphere {<0,0,0>,23 scale <1,15,1> translate y*76 clipped_by {cylinder {<0,76,0>,<0,265,0>,30}}} 140 torus {20 2 translate y*255} 141 torus {19 2 translate y*258} 142 object {SphereBox (20) rotate z*180 translate y*(260+22)} 143 box {<-25,282,-25>,<25,285,25>} 144 box {<-20,285,-22>,<20,295,22>} 145 difference { 146 cylinder {<-22,290,0>,<22,290,0>,5} 147 cylinder {<-23,290,0>,<23,290,0>,3} 148 } 149 box {<-23,295,-23>,<23,298,23>} 150 box {<-28,298,-28>,<28,300,28>} 151} 152 153#declare Vault_01 = 154difference { 155 box {<-160,0,-160>,<160,250,160>} 156 cylinder {<-170,0,0>,<170,0,0>,130} 157 cylinder {<-170,0,0>,<170,0,0>,130 rotate y*90} 158} 159 160#declare Vault_02 = //(vault de coin) 161difference { 162 union { 163 box {<-180,0,-160>,<180,250,160>} 164 box {<-160,0,-180>,<160,250,180>} 165 } 166 cylinder {<-190,0,0>,<190,0,0>,130} 167 cylinder {<-190,0,0>,<190,0,0>,130 rotate y*90} 168} 169 170#declare Spindle_01 = 171lathe{ 172 cubic_spline 173 12, 174 <0.017005,-0.005668>, 175 <0.117619,-0.004251>, 176 <0.123287,0.072272>, 177 <0.068020,0.124704>, 178 <0.076523,0.195559>, 179 <0.141709,0.444967>, 180 <0.075106,0.524324>, 181 <0.138875,0.616435>, 182 <0.055267,0.916859>, 183 <0.137458,0.973543>, 184 <0.161549,1.000468>, 185 <0.204061,0.991965> 186} 187 188#declare Band_01 = 189union { 190 box {<0,0,-25>,<-1,60,25>} 191 box {<0,0,-25>,<5,2,25>} 192 box {<0,8,-25>,<3,2,25>} 193 box {<0,8,-25>,<6,15,25>} 194 box {<0,8,-10>,<6,15,-8>} 195 box {<0,8,10>,<6,15,8>} 196 box {<0,20,-25>,<3,19,25>} 197 box {<0,50,-25>,<5,60,25>} 198 box {<0,50,-25>,<3,55,25>} 199 box {<0,20,-2>,<3,40,-4>} 200 box {<0,20,-6>,<3,40,-8>} 201 box {<0,20,2>,<3,40,4>} 202 box {<0,20,6>,<3,40,8>} 203 box {<0,42,-25>,<6,40,25>} 204 box {<0,0,-2>,<7,8,-4>} 205 box {<0,0,-6>,<7,8,-8>} 206 box {<0,0,2>,<7,8,4>} 207 box {<0,0,6>,<7,8,8>} 208} 209 210#declare Balcony_01 = union { 211 box {<-10,0,-.5>,<10,10,.5>} 212 cylinder {<-10,5,-.5>,<-10,5,.5>,4} 213 cylinder {<10,5,-.5>,<10,5,.5>,4} 214} 215 216#declare Group1 = union { 217 object {Arch_01 translate <-490,300,0>} 218 object {Arch_01 translate <-490,300,300>} 219 object {Arch_01 translate <-490,300,-300>} 220 221 object {Column_01 translate <-490,0,150>} 222 object {Column_01 translate <-490,0,-150>} 223 object {Column_01 translate <-490,0,-450>} 224 object {Column_01 translate <-490,0,450>} 225 226 object {Column_01 translate <-790,0,150>} 227 object {Column_01 translate <-790,0,-150>} 228 object {Column_01 translate <-790,0,-450>} 229 object {Column_01 translate <-790,0,450>} 230 object {Column_01 translate <-790,0,-450-40>} 231 object {Column_01 translate <-790,0,450+40>} 232 233 object {Arch_01 rotate y*90 translate <-490-150,300,150>} 234 object {Arch_01 rotate y*90 translate <-490-150,300,-150>} 235 object {Arch_01 rotate y*90 translate <-490-150,300,450>} 236 object {Arch_01 rotate y*90 translate <-490-150,300,-450>} 237 object {Arch_01 rotate y*90 translate <-490-150,300,450+40>}//doubleaux 238 object {Arch_01 rotate y*90 translate <-490-150,300,-450-40>} 239 240 object {Vault_01 translate <-640,300,0>} 241 object {Vault_01 translate <-640,300,300>} 242 object {Vault_01 translate <-640,300,-300>} 243 object {Vault_02 translate <-640,300,640>}//coin 244 245 #declare I=0; 246 #while (I < 1000) 247 object {Band_01 translate <-480,500,(-470 + I)>} 248 #declare I=I+50; 249 #end 250 251 #declare I=0; 252 #while (I < 1000) 253 object {Spindle_01 scale <60,60,60> translate <-500,550,(-500 + I)>} 254 #declare I=I+40; 255 #end 256 257 object {Balcony_01 scale <1,1,1020> translate <-500,610,0>} 258 object {Balcony_01 scale <1,1,1020> translate <-500,610,0> rotate y*90} 259 object {Balcony_01 scale <1,1,1020> translate <-500,610,0> rotate y*180} 260 object {Balcony_01 scale <1,1,1020> translate <-500,610,0> rotate y*270} 261 262 box {<-790,0,-810>,<-810,450,810>} 263 264} 265 266#declare PatioComplete = union { 267 object {Group1} 268 object {Group1 rotate y*90} 269 object {Group1 rotate y*180} 270 object {Group1 rotate y*270} 271} 272 273object {PatioComplete 274 pigment {Wheat} 275 finish {ambient 0.0 diffuse 0.6} 276} 277 278#declare Paving_01 = 279union { 280 box {<-40,0,-490>,<40,.1,490> translate x*150} 281 box {<-40,0,-490>,<40,.1,490> translate x*-150} 282 box {<-40,0,-490>,<40,.1,490> translate x*490} 283 box {<-40,0,-490>,<40,.1,490> translate x*-480} 284 285 texture { 286 pigment {color rgb <0.706,0.714,0.776>*.8} 287 finish {ambient 0.0 diffuse 0.6} 288 } 289} 290 291object {Paving_01 translate <-10,0,0>} 292object {Paving_01 rotate y*90 translate <-10,0,0>} 293