POV-Ray : Newsgroups : povray.general : Re: Baseball seam equasion Server Time
13 Aug 2024 11:19:15 EDT (-0400)
  Re: Baseball seam equasion (Message 1 to 1 of 1)  
From: Chris Colefax
Subject: Re: Baseball seam equasion
Date: 26 Aug 1998 20:22:05
Message: <35E34603.73DF9484@geocities.com>
Duane Tackett wrote:
> 
>     I was working on an image for a friend of mine who is really into
> baseball and i thought "Sure, no problem!  How hard can it be?"  I was going
> fine until I got to the baseball.  It seems there is the matter of the seam
> and the stitching that goes with it.  The stitching probably won't be too
> hard to do once I get the first thing I need:  The equasion for the seam.
> Unfortunately, I have only had up to college algebra so I haven't had enough
> math to figure out the equasion for a 3D sine wave.  Those machines that
> make baseballs have to use an equsion of some sort to follow the stitches!
>     Also, is there something similar to a "point" I can use in pov-ray that
> would allow me to actually place the seam on the baseball?  Any help would
> be greatly appreciated.

Perhaps you could use rotations, which I often find easier than fiddling
with equations.  This way, you can position a single stitch somewhere on
the surface of the ball, knowing that no matter how you much you rotate
it, in any direction, it will remain on the surface, eg:

camera {location -z * 3}
light_source {<10, 10, -50> rgb 1.33}

#declare Thread = sphere {0, 1
   pigment {rgb <.6, .2, .2>}
   normal {bumps 1 scale <.5, 1.5, .5>}
   scale <.3, 1, .3>}

#declare Stitch = union {
   object {Thread rotate x * 45 translate <0, -.5, .5>}
   object {Thread rotate x * -45 translate <0, .5, -.5>}
   scale 0.05 translate x rotate y * 45}

#declare QuarterStitch = union {
   #declare C = 0; #while (C <= 180)
     object {Stitch rotate x * C}
   #declare C = C + 5; #end
   }

union {
   sphere {<0, 0, 0>, 1 pigment {rgb 1} normal {bumps .3 scale .6}}
   object {QuarterStitch} object {QuarterStitch scale <1, -1, 1> rotate y * 90}
   object {QuarterStitch rotate y * 180} object {QuarterStitch scale <1, -1, 1> rotate
<0, -90, 0>}
   rotate <15, 30, 0>}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.