// Kenneth Walker 1/28/24-- re-edited test file #version 3.7; global_settings{assumed_gamma 1.0} //#default{finish{ambient 1 emission 0 diffuse 0}} // [My original] // replacement from William P: #declare DfltTxtr = texture { finish{ambient 1 emission 0 diffuse 0} } #declare WHICH_TEST_ = 1; // 1 or 2 #declare USE_CUTAWAY_TEXTURES_ = off; // or on // no lights are used background{rgb 0} #declare MY_OBJ_ = union{ difference{ sphere{0,1 scale 1 } sphere{0,.7 translate <0,0,-1.2>} } sphere{0,0.5 translate 3*x} cylinder{-1.2*z,1.2*z,.2 translate 3*x} box{0,2 translate -1 translate <-3,0,0>} cylinder{-2.7*x,2.7*x,.1} cone{0,.9,-1.3*z,0 translate <-3,0,-.9>} texture{ pigment{ gradient x color_map{ [.5 rgb <1,.7,.2>] [.5 rgb .5*<0,.2,1>] } } finish{ambient .05 emission 0 diffuse .95 phong .5 phong_size 15} } } #declare OBJ_COLOR_ = rgb 1; #declare MIN_BB_ = min_extent(MY_OBJ_); #declare MAX_BB_ = max_extent(MY_OBJ_); #declare XYZ_SIZE_ = MAX_BB_ - MIN_BB_; #if(WHICH_TEST_ = 1) object{MY_OBJ_ #if(USE_CUTAWAY_TEXTURES_) finish{ambient 1 emission 0 diffuse 0} #else //texture{pigment{rgb 1}} // [my original] //replaced with William P's suggestion: texture{ DfltTxtr pigment{rgb 1} } #end } box{MIN_BB_ - .2*y,MAX_BB_ + .2*y pigment{rgbt <3,.25,.3,.95>} finish{ambient 1 emission 0 diffuse 0} } #else #end #if(WHICH_TEST_ = 2) intersection{ object{MY_OBJ_ finish{ambient 1 emission 0 diffuse 0}} // an intersecting horizontal box, ZERO thickness. NO applied texture and no(?) *default* texture. box{, } #if(USE_CUTAWAY_TEXTURES_) cutaway_textures #else //pigment{OBJ_COLOR_} // [my original] // replaced with William P's suggestion: texture{ DfltTxtr pigment{OBJ_COLOR_} } #end } #else #end // automatically centers the camera under the center of the bounding box #if(WHICH_TEST_ & XYZ_SIZE_.z >= XYZ_SIZE_.x) #declare CAM_Y_ = (MAX_BB_.z - MIN_BB_.z); #else #declare CAM_Y_ = (MAX_BB_.x - MIN_BB_.x); #end camera { orthographic location look_at right x*image_width/image_height direction z angle 14.3 }