Class Obstacle
source code
An obstacle in the sea. Currently an obstacle is just a straight line.
This class support general polygon but, for now we only want line
composed of 2 points. It is possible to construct complex obstacles just
from straight lines.
Therfore, for now IGNORE the following: [Currently implemented as a
list of points, where connecting each two consecutive points by line
defines the obstacle's shape. The first point should be equal to the last
one.]
- Parameters:
points (a list of (x,y) tuples) - a list of points - connecting each consecutive pair of points by
line defines the obstacle's shape.
|
- Returns: tuple
- a list of points defining the shape of the obstacle
|