// http://xahlee.org/3d/index.html // example of prism. #include "colors.inc" camera { location <7,9,-5> * .4 look_at <1.5,0,0> } light_source {<13, 15, 20> color White} prism { linear_sweep linear_spline 0, // starting height .6, // ending height 5, // the number of coordinates below <0,0>, <1,0>, <2,1>, <1,1>,<0,0> // note the extra last point to close the outline texture{pigment{color Red}} finish {ambient .1} translate <-2,0,0> } prism { linear_sweep quadratic_spline 0, .6, 6, <1,1>, <0,0>,<1,0>,<2,1>,<1,1>,<0,0> // first point is a control point when using quadratic_spline // the last point is to close the outline texture{pigment{color Green}} finish {ambient .1 specular .9} translate <0,0,0> } prism { linear_sweep cubic_spline 0, .6, 8, <2,1>,<1,1>, <0,0>,<1,0>,<2,1>,<1,1>,<0,0>, <1,0> // first 2 point are control points when using cubic_spline // last point is also a control point texture{pigment{color Yellow}} finish {ambient .1 } translate <2,0,0> } plane { <0,1,0>, -0.01 pigment {checker color White, color Gray}}