Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Gaming > Development Programming Algorithms > Re: grid
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 10 of 12 Topic 615 of 680
Post > Topic >>

Re: grid

by "Anush" <itsanushshetty@[EMAIL PROTECTED] > Feb 18, 2007 at 12:32 AM

On Feb 15, 8:42 pm, nat...@[EMAIL PROTECTED]
 (Nathan Mates) wrote:
> In article <1171442828.610278.297...@[EMAIL PROTECTED]
>,
>
> Anush <itsanushshe...@[EMAIL PROTECTED]
> wrote:
> >I have a square grid of unit size. If i have a line between any two
> >points, how do i find out the number of the intersecting squares.
>
>    If you're trying to figure out which squares the line goes into,
> you could just run a bresenham's algorithm, and count things. 
Seehttp://en.wikipedia.org/wiki/Bresenham's_line_algorithm,
or do a
> google search for it.
>
> Nathan Mates
> --
> <*> Nathan Mates - personal webpagehttp://www.visi.com/~nathan/
> # Programmer at Pandemic Studios --http://www.pandemicstudios.com/
> # NOT speaking for Pandemic Studios. "Care not what the neighbors
> # think. What are the facts, and to how many decimal places?" -R.A.
Heinlein

I think Bresenham's algorithm is the best best :)

-
Anush
 




 12 Posts in Topic:
grid
"Anush" <its  2007-02-14 00:47:08 
Re: grid
"Cari Elf" <  2007-02-14 06:51:02 
Re: grid
"Anush" <its  2007-02-14 09:15:46 
Re: grid
"Cari Elf" <  2007-02-15 05:15:02 
Re: grid
"Anush" <its  2007-02-15 06:11:28 
Re: grid
nathan@[EMAIL PROTECTED]   2007-02-15 15:42:01 
Re: grid
"Cari Elf" <  2007-02-16 05:03:28 
Re: grid
"Anush" <its  2007-02-16 07:10:07 
Re: grid
"Jim Langston"   2007-02-16 16:13:42 
Re: grid
"Anush" <its  2007-02-18 00:32:24 
Re: grid
"L. Shyamal" &l  2007-03-09 19:59:19 
Re: grid
"L. Shyamal" &l  2007-03-09 20:06:44 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 2:12:45 CDT 2008.