Make an array that stores waypoints like so:
Dim Waypoints(x,y)
for rx = 1 to x
for ry = 1 to y
read waypoints(rx,ry)
next ry
next rx
Data 1,2,3,4,0,0,0,0,12
data 0,0,0,0,5,0,0,0,11
data 0,0,0,0,6,0,0,0,10
data 0,0,0,0,0,7,8,9,0
Waypoints(x,y):array for waypoints
_________^ ^
_________| |
_________| |
insert x and y size here
for/next loop : reads data into array so that whatever you have ate the 1,1 position in you data statements, whill be at the 1,1 position in your array.
Data statements: Has 0 for no array, and 1 - 12 for waypoints folowed in cronalogical order. You can change this to fit your needs whatever they need be.
Hope that helps
(Y=M*X+B)=(X=(Y-B)/M)=(B=Y-M*X)=(M=Y-B/X)
and if you can figure out what it means i will give you a cookie.