POV-Ray : Newsgroups : povray.programming : easy way to do a baseball field? Server Time
22 Dec 2024 01:03:27 EST (-0500)
  easy way to do a baseball field? (Message 1 to 3 of 3)  
From: lester
Subject: easy way to do a baseball field?
Date: 6 Sep 2010 23:00:01
Message: <web.4c85a9c21a759ffdb295fc90@news.povray.org>
Hi,
i was looking for an easy way to do a baseball field like this one:
http://www.proschoice1.com/images/baseball_field.gif

any advice is welcome.
thanks..


Post a reply to this message

From: omniverse
Subject: Re: easy way to do a baseball field?
Date: 10 Sep 2010 14:50:00
Message: <web.4c8a7cadc6cded8cd939a6800@news.povray.org>
"lester" <les### [at] hotmailcom> wrote:
> i was looking for an easy way to do a baseball field like this one:
> http://www.proschoice1.com/images/baseball_field.gif

I was going to suggest object pigment(s) until I tried it and failed the
attempt.  :)
Here's what I finally did instead. Needs rescaling to be correct measurements
for a real field. I didn't consider thickness either, just wanted all parts to
show. Originally was making a pigment pattern for a flat plane anyhow. I haven't
used POV for that purpose in uncounted years, maybe somebody else has answers.
Also, you would want to think about how to go about doing real
dimensions/measurements. I chose not to use actual numbers of feet/meters for
this, only going for a likeness of the drawing you gave, otherwise I might have
done this minus the 45 degree angle first so as to have axial distances then
afterward rotate the field (if you understand my meaning).

// baseball field (needs much adjusting)
//cmd:+w400 +h350 +a0.2 +r4

camera
{
 orthographic
 location <0,1111,88>
 look_at <0,0,88>
 up 350*z
 right 400*x
}

#declare BBFP=
union // baseball diamond
{
union  // dirt
{
 box
 {
  <0,-0.01,0>, <200,0,200>
  rotate -45*y
  translate -88*z
 }
 cylinder
 {
  <0,-0.1,-69>, <0,0,-69>
  18
 }
 pigment {rgb <0.7,0.5,0.3>}
 finish {ambient 1}
} // end dirt
difference // infield grass
{
 box
 {
  <-45,0.01,-45>, <45,0.01,45>
  rotate 45*y
 }
 sphere
 {
  0,
  11
 }
 sphere
 {
  -63*z,
  15
 }
 sphere
 {
  <-60,0,0>,
  12
 }
 sphere
 {
  <60,0,0>,
  12
 }
 sphere
 {
  <0,0,60>,
  12
 }
 pigment {rgb <0.1,0.5,0.2>}
 finish {ambient 1}
} // end infield
 difference // outfield grass
 {
  sphere
  {
   0,250
   scale <0.88,1,1>
  }
  sphere
  {
   0,90
  }
  box
  {
   <0,-0.1,0>, <360,0.1,360>
   rotate -45*y
   translate -88*z
   inverse
  }
 pigment {rgb <0.1,0.5,0.2>}
 finish {ambient 1}
 } // end outfield
 union // bases
 {
  box // 1st
  {
   -1,1
   scale <2,0.1,2>
   rotate 45*y
   translate <67,0,0>
  }
  box // 2nd
  {
   -1,1
   scale <2,0.1,2>
   rotate 45*y
   translate <0,0,67>
  }
  box // 3rd
  {
   -1,1
   scale <2,0.1,2>
   rotate 45*y
   translate <-67,0,0>
  }
  difference // home
  {
  box
  {
   -1,1
   scale <2,0.1,2>
  }
  box
  {
   -1,1
   scale <3,0.11,3>
   rotate 45*y
   translate 2*z
   inverse
  }
   translate <0,0,-67>
  }
  box // pitch
  {
   -1,1
   scale <2.5,0.1,0.75>
   translate <0,0,2>
  }
  pigment {rgb 1}
  finish {ambient 1}
 } // end bases
 union // lines
 {
  box
  {
   0,1
   scale <0.8,0.15,260>
   rotate -45*y
   translate <-9,0,-62>
  }
  box
  {
   0,1
   scale <0.8,0.15,260>
   rotate 45*y
   translate <9,0,-62>
  }
  difference // batter's box
  {
   box
   {
    -1,1
   }
   box
   {
    -1,1
    scale <0.8,1.1,0.8>
   }
   scale <3,0.15,5>
   translate <-6,0,-67>
  }
  difference // batter's box
  {
   box
   {
    -1,1
   }
   box
   {
    -1,1
    scale <0.8,1.1,0.8>
   }
   scale <3,0.15,5>
   translate <6,0,-67>
  }
  pigment {rgb 1}
  finish {ambient 1}
 } // end lines
} // end baseball diamond

object {BBFP}


Post a reply to this message

From: omniverse
Subject: Re: easy way to do a baseball field?
Date: 10 Sep 2010 14:55:00
Message: <web.4c8a7e40c6cded8cd939a6800@news.povray.org>
Can't believe I just replied into programming with that CSG example!

Sorry all. Been too long since posting anything, and especially using web
interface. I was looking at the most recent digest and not paying attention to
where I was.

Lester, please ask about this in povray.general not here.


Post a reply to this message

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