//csgDemo //Andy Harris // An area light (creates soft shadows) // WARNING: This special light can significantly slow down rendering times! light_source { 0*x // light's position (translated below) color rgb 1.0 // light's color // nLightsWide mLightsHigh area_light <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z) 4, 4 // total number of lights in grid (4x*4z = 16 lights) adaptive 0 // 0,1,2,3... jitter // adds random softening of light translate <40, 80, -40> // position of light } camera { location <0.0 , 1.0 ,-5.0> look_at <0.0 , 1.0 , 0.0> } background{ rgb <1, 1, 1> } //replace the word 'union' with 'difference', merge, and 'intersection' union { // create a box that extends between the 2 specified points box { <-.2, 0, -2> // one corner position < .2, 2, 2> // other corner position pigment { color rgbf <1 .8 .8 .8> } // end pigment } // end box cylinder { <-1, 1, 0> <1, 1, 0>, 1 pigment { color rgbf<.8 .8 1 .8> } // end pigment } // end cylinder rotate y* 30 } // end union