PHP Find Coordinates between two points

Posted by Ozzy on Stack Overflow See other posts from Stack Overflow or by Ozzy
Published on 2010-03-14T06:09:32Z Indexed on 2010/03/14 6:15 UTC
Read the original article Hit count: 308

Filed under:
|
|
|

Hi all, simple question here. Lets say I have two points:

point 1

x = 0
y = 0


point 2

x = 10
y = 10

How would i find out all the coordinates inbetween that programmatically, assuming there is a strait line between two points... so the above example would return:

0,0
1,1
2,2
3,3
...
8,8
9,9
10,10

Thanks :)

© Stack Overflow or respective owner

Related posts about php

Related posts about coordinates