// column_fancy.pov by Eric Freeman // a column with grooves cut into the sides // // first, set the user-changeable variables listed below // #declare pillar_bottom = 5; etc. // // add the following statement // #include "column.inc" // // then to add a column to your scene, just use the following statement // object { Column } // translate and rotate into position // standard include files #include "colors.inc" #include "stones.inc" #include "golds.inc" // user-changeable variables #ifndef (pillar_bottom) #declare pillar_bottom = 0.0 #end #ifndef (pillar_top) #declare pillar_top = 20.0 #end #ifndef (col_width) #declare col_width = 5 #end #ifndef (cap_texture) #declare cap_texture = texture { T_Gold_1A } #end #ifndef (col_texture) #declare col_texture = texture { T_Stone20 scale 4.8 } #end //------- #declare disk_height = 0.25*col_width // changeable #declare groove_width = 0.2*col_width // changeable #declare groove_end = groove_width // sets the y of the groove - changeable #declare groove_offset = 1.06*col_width // sets the z of the groove - changeable #declare col_height = (pillar_top-pillar_bottom)-(2*disk_height) #declare col_bottom = pillar_bottom+disk_height #declare col_top = col_bottom+col_height // textures // PILLAR OBJECTS // define the disk #declare single_disk = object { union { cylinder { < 0.0, col_bottom, 0.0 >, < 0.0, col_bottom-disk_height, 0.0 >, col_width } torus { col_width, 0.5*disk_height sturm translate (col_bottom-0.5*disk_height)*y } texture { cap_texture } } } // define the two disks #declare bottom_disk = single_disk #declare top_disk = object { single_disk translate col_top*y } // define the groove #declare cut_out_cyl = union { cylinder { <0.0, col_bottom+groove_end+groove_width, groove_offset>, <0.0, (col_top-groove_end)-groove_width, groove_offset>, groove_width } sphere { <0.0, (col_top-groove_end)-groove_width, groove_offset>, groove_width } sphere { <0.0, col_bottom+groove_end+groove_width, groove_offset>, groove_width } } // define the entire pillar #declare column_whole = object { union { difference { cylinder { // the main cylinder of the column <0, col_bottom, 0>, <0, col_top, 0>, col_width } // cut each instance of the groove object into the column #declare groove_count = 0 #while (groove_count < 330) object { cut_out_cyl rotate < 0.0, groove_count, 0.0 > } #declare groove_count = groove_count+30 #end } bottom_disk top_disk } } // define an instance of the pillar #declare Column = object { column_whole texture { col_texture } // must be put here so each column is different } // END OF FILE