Let's say we have a rectangular sea. It's quite large - 10000x20000.
We have islands, as well. For simplicity's sake, let's assume they are rectangular as well. We know their exact places (coordinates).
If we have a ship, somewhere on the map - (x1, y1), how can we find the shortest path to another point on the map (x2, y2) without going over any of the islands?
Update: There are no constraints so far - for the ship or for the sea. If we can simplify (and speed up) things by adding a few - this is more than welcome.
The path even doesn't have to be the best - it can be 10% off for example - perfectly acceptable.