/* ========================================================= BBSTITCH A glass baseball or two, and a white baseball or two, none too realistic in texture, demonstrating how to place objects such as stitches or flower pots along the seam. Lighting is really bad. Modelling is very crude. The purpose of this script is only to demo the baseball seam. (C) 2006 Daren Scot Wilson, Boulder Colorado This script is intended for educational purposes, and may be copied, modified and distributed for classroom and noncommercial use. Contact: Daren Scot Wilson, GreenSquiggle@comcast.net www.darenscotwilson.com ========================================================= */ #include "bbcommon.povi" #declare BBallRadius = 9.25/2.0; #declare RedThread = texture { pigment { color rgb <.75, .33, .20> } finish { ambient .2 diffuse .8 } } #declare Baseball = union { sphere { 0, BBallRadius pigment { color rgb 1 } finish { ambient .2 diffuse .8 phong .007 phong_size 7} } #declare aa=0.0; #while (aa<360.0) ComputeBBallSeam(aa, BBallRadius); cylinder { pSeam-.4*wSeam, pSeam+.3*vSeam, .1 texture {RedThread}} cylinder { pSeam+.4*wSeam+.1*vSeam, pSeam+.3*vSeam+.1*vSeam, .1 texture {RedThread}} #declare aa = aa + 3.333334 ; // baseball sposta have 108 stitches, IIRC... #end } object { Baseball rotate <11,22,33> translate < 0, 0, 0> } object { Baseball rotate 33*x translate < -11, -8, 9 > } object { Baseball rotate 44*y translate < 0, -8, -9 > } object { Baseball rotate 44*z translate < -13, 15, -9 > } object { Baseball rotate < 22,22,22> translate < -28, -11, 15 > } object { Baseball rotate < 22,55,-22> translate < 10, 9, 8 > } object { Baseball rotate 45*x translate < -9, -2, -13 > } object { Baseball rotate <66,11,77> translate < -71, 23, 2 > } // ground - Xtreme Nonrealistic - green checkerboard, 12" squares plane { z, -70 pigment { checker color rgb <.18, .28, .22> color rgb <.28, .38, .26> scale 24.0} finish { ambient .75 diffuse .75 } } plane { -z, -999 pigment { bozo color_map { [ .71 rgb <.73, .85, .91> ] [ .78 rgb <.99, .99, .99> ] } turbulence .5 octaves 7 scale <200, 700, 22> } finish {ambient 1} scale 1000 } /* ---------------- LIGHTING -------------------- */ #declare SunDimmer = 0.95 ; #declare BlueSkyDimmer = .7 ; #declare GrassGlowDimmer = 1.4 ; // key light, sun high up and behind us light_source { <1000, 500, 1000> color SunDimmer } // another white light as generic fill light light_source { <500, -800, 700> color SunDimmer*.25 } // red light from left to help fill in shadows, help modelling light_source { <-100, -100, 0> color rgb <1, .35, .20> * .3 } // yellow light from low front right. counterbalances the blue sky, green grass light_source { <-150, 100, -7> color rgb <.5, .5, .1>*.6 } // blue light from sky light_source { <-500, -500, 950> color rgb <0.1, .3, .4>*BlueSkyDimmer /5} light_source { <-500, 500, 950> color rgb <0.1, .3, .4>*BlueSkyDimmer /5} light_source { < 500, -500, 950> color rgb <0.0, .3, .4>*BlueSkyDimmer /5} light_source { < 500, 500, 950> color rgb <0.0, .3, .4>*BlueSkyDimmer /5} light_source { < 0, 0, 950> color rgb <0.0, .3, .4>*BlueSkyDimmer /5} // green glow from grass light_source { < -30, -20, -55> color rgb <.04, .14, 0>*GrassGlowDimmer /4 } light_source { < -30, 20, -55> color rgb <.04, .14, 0>*GrassGlowDimmer /4 } light_source { < 10, -20, -55> color rgb <.04, .14, 0>*GrassGlowDimmer /4 } light_source { < 10, 20, -55> color rgb <.04, .14, 0>*GrassGlowDimmer /4 } camera { location <110, 0, 1> up z right y*1.33 direction -x // look_at 0 angle 25 }