#include "colors.inc" #include "woods.inc" #include "metals.inc" #include "glass.inc" background { color rgb 0.15 } camera { location <0, 1, -3> look_at 0 } light_source { <0, 20, 0> color rgb 0.5 } #declare table = union { box { <-1, 0, -1>, <1, 0.1, 1> } box { <-1, 0, -1>, <-0.8, -1, -0.8> } box { <1, 0, -1>, <0.8, -1, -0.8> } box { <1, 0, 1>, <0.8, -1, 0.8> } box { <-1, 0, 1>, <-0.8, -1, 0.8> } texture { P_WoodGrain1B scale .20 finish { reflection .4 } } } #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 { Black } 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 { Black } 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 { table rotate y*20 } object { lamp scale .10 rotate y*160 translate <0.7, 0.1, 0> }