#include "colors.inc" #include "woods.inc" #include "metals.inc" #include "glass.inc" background { White } camera { location <0, 5, -12> look_at <0, 5, 0> } light_source { <100, 100, -100> White } #declare lamp_body = union { lathe { linear_spline 7, <0, 0.1>, <2, 0.1>, <2, 0.2>, <1.9, 0.2>, <1.9, 0.3>, <1.8, 0.4>, <0, 0.4> } merge { difference { sphere { <0, 0.4, 0>, 1.8 } box { <2, 0.4, 2>, <-2, -2, -2> } } box { <1.8, 0.4, -0.3>, <0.8, 2.0, 0.3> } cylinder { <-1.0, 0.4, -0.5>, <-1.0, 2.0, -0.5>, 0.15 } cylinder { <-1.0, 0.4, 0.5>, <-1.0, 2.0, 0.5>, 0.15 } } texture { pigment { Red } finish { ambient 0.3 phong 0.5 } } } #declare lamp_neck = union { cylinder { <-1.0, 2.0, -0.5>, <-1.0, 2.2, -0.5>, 0.1 } cylinder { <-1.0, 2.0, 0.5>, <-1.0, 2.2, 0.5>, 0.1 } cylinder { <-1.0, 2.15, 0.5>, <0, 9.0, 0.5>, 0.1 } cylinder { <-1.0, 2.15, -0.5>, <0, 9.0, -0.5>, 0.1 } cylinder { <0, 8.9, -0.5>, <0.2, 8.9, -0.5>, 0.1 } cylinder { <0, 8.9, 0.5>, <0.2, 8.9, 0.5>, 0.1 } texture { T_Silver_3A } } #declare lamp_head = union { difference { merge { difference { sphere { <1.3, 8.7, 0>, 1 } box { <0, 8.7, 1.5>, <3, 7.5, -1.5> } } cylinder { <0.2, 8.9, -0.5>, <1.3, 8.9, -0.5>, 0.15 } cylinder { <0.2, 8.9, 0.5>, <1.3, 8.9, 0.5>, 0.15 } } sphere { <1.3, 8.7, 0>, 0.9 texture { T_Silver_3A } } } cylinder { <1.3, 8.7, 0>, <1.3, 8.67, 0>, 1 texture { T_Glass1 } } texture { pigment { Red } finish { ambient 0.3 phong 0.5 } } } #declare lamp_light = light_source { <1.3, 9.4, 0> White fade_distance 5 fade_power 1 } #declare lamp = union { object { lamp_body } object { lamp_neck } object { lamp_head } object { lamp_light } } object { lamp rotate y*160 }