The stupid question is the question not asked | |
PerlMonks |
Re: Mapping paths?...by DrZaius (Monk) |
on May 17, 2001 at 22:27 UTC ( [id://81327]=note: print w/replies, xml ) | Need Help?? |
You should probably use a hash instead of an array for your coordinates. If I remember correctly, if you have an index of 100 as your first entry, perl will create @array[0..99] as well as $array[100].
Although, you may have all the entries in your grid filled in anyway :) I imagine the best way to calculate the path would be determine the slop of the line between the two points and try plotting until you get there. If that isn't the best way, I imagine the solution does involve find slopes between two points in fragments. good luck.
In Section
Seekers of Perl Wisdom
|
|