#include "colors.inc" #include "textures.inc" #declare Horizon = 100; camera { // sky <3, 10, 0> location <-7, 10, -Horizon> look_at <0, 0, 0> } light_source { // position of the light source color White // color of the light area_light x, z, 4, 4 // (---for area_light---) adaptive 0 jitter circular orient // (---other modifiers---) // looks_like { OBJECT } fade_distance 80 fade_power 1.0 media_attenuation true media_interaction true //shadowless } //sky sky_sphere { pigment { bozo turbulence 1 color_map { [0.2 Gray70] [1.0 MidnightBlue] } scale <0.45, 0.05, 0.10> } } // roads #declare a = 10; #declare b = 0.3; #declare Road = difference { box { <-a, 0, Horizon>, } union { #declare i = -20; #while (i < 20) box { <-b, -0.1, -18*i>, } #declare i = i + 1; #end } texture { pigment { bozo color_map { [0.5 Gray35] [1.0 White] } scale <4, 2, 1> } normal { facets coords 0.3 } } } object { Road translate -a*x } object { Road translate a*x } // fields and middle #declare P_Field1 = pigment { bozo color_map { [0.4 White] [1.0 Khaki] } //scale 1.5 } #declare Field = box { <2*a, 0, Horizon>, pigment { P_Field1 } normal { bumps 0.4 scale 3 } } #declare Edge = cylinder { <0, -0.7, Horizon>, <0, -0.7, -Horizon>, a/10 pigment { P_Field1 } normal { bumps 0.4 scale 0.5 } scale 1.5*x } union { object { Edge } object { Field } object { Field scale -x} } // post lights #declare w = 0.25; #declare h = 12; #declare ang = 30; #declare c = 2; #declare disk = 0.75; #declare LightBulp = union { difference { sphere { <0, 0, 0>, disk } box { <-disk, 0, -disk>, } } difference { sphere { <0, 0, 0>, disk } box { <-disk, disk, -disk>, } material { M_Glass3 } } } #declare LightPost_Right = merge { merge { // top bar and light merge { object { LightBulp scale 2.25*x translate <4+2*disk, c, 0> } cylinder { <0, c, 0>, <4, c, 0>, w } rotate z*ang } // curve difference { torus { 2, w rotate -90*x } union { box { <0, c+w, 1>, rotate z*ang } box { <-(c+w), 0, 1>, } } } translate <2, h, 0> } // post cylinder { <0, h, 0>, <0, 0, 0>, w } texture { pigment { rgb Gray10 } finish { Metallic_Finish } } } #declare LightPost_Left = merge { merge { // top bar and light merge { object { LightBulp scale 2.25*x translate <-(4+2*disk), c, 0> } cylinder { <0, c, 0>, <-4, c, 0>, w } rotate z*-ang } // curve difference { torus { 2, w rotate -90*x } union { box { <-(c+w), c+w, 1>, <0, -(c+w), -1> rotate z*-ang } box { <-(c+w), 0, 1>, } } } translate <-2, h, 0> } // post cylinder { <0, h, 0>, <0, 0, 0>, w } texture { pigment { rgb Gray10 } finish { Metallic_Finish } } } #declare LightPostRows = #declare i = -9; #while (i < 9) object { LightPost_Left translate <2*a+10, 0, 10*i> } object { LightPost_Right translate <-(2*a+10), 0, 10*i> } #declare i = i + 2.5; #end object { LightPostRows } // field fences #declare w = 0.50; #declare h = 3; #declare Wedge = cylinder { <0, h/2, 0>, <0, -h/2, 0>, w pigment { Dark_Wood } } #declare Fences = #declare i = -9; #while (i < 9) object { Wedge translate <4*a+10, h/2, 10*i> } object { Wedge translate <-(4*a+10), h/2, 10*i> } #declare i = i + 1; #end object { Fences }