// Mock roof with hole for mounting the heater. // Last edited on 2005-08-29 23:05:39 by stolfi #macro roof_mount(roof_incl, heater_ht, heater_rad) #local tx_plaster = texture { pigment { color rgb < 0.900, 0.850, 0.500 > } finish { ambient 0.20 diffuse 0.80 } } #local tx_rooftile = texture { pigment { color rgb < 0.500, 0.250, 0.100 > } finish { ambient 0.20 diffuse 0.80 } } #local ri = radians(roof_incl); #local rx = heater_rad + 0.100; #local ry = heater_rad*cos(ri) + heater_ht*sin(ri) + 0.100; // #local rz = heater_rad*sin(ri) + heater_ht*cos(ri) + 0.200; #local rz = ry*sin(ri) + 0.100; #local pit_depth = heater_ht + 0.100; #local pit_rad = heater_rad + 0.050; // Heater mounting box: difference { intersection { box { < -rx, -ry, -rz >, < +rx, +ry, +rz > texture { tx_plaster } } plane { z,0 rotate -roof_incl*x texture { tx_rooftile } } } cylinder { < 0, 0, +pit_depth >, < 0, 0, -pit_depth >, pit_rad rotate -roof_incl*x texture { tx_plaster } } } #end