
This program (p.c) is an effective object avoidance program for robot
arm manipulation.

Basically it solves the problem of finding minimum path distance between
the start and end coordinates, with the added restriction that every point
on the path must be within a certain distance of the origin (including
extra distance required to get around occluding objects). It is
useful in situations where the robot arm has many joints, and can fold
back on itself very easily. That is, it does not check that the arm segments
can fit through the gaps that have been specified.

It will give all relevant errors.

Data file format:

%f					arm length (pixels)
%d %d				start x,y
%d %d				end x,y

%d %d %d %d			corner (x,y) to (x,y) for occluding objects.


The resultant objects can be joined together to give very complex problems
for the program to solve.

It works in two parts. The first part is to determine the distance from the
origin to each pixel. The second part works out the distance from the start
co-ordinate to each pixel, given that going beyond the arm length from the 
origin is not possible.

The output path is displayed on the screen as a purple line connecting the
regions.

At the moment it works in 2D, but will generalise very trivially to 3D
(or higher, for that matter!)

compile: cc -o p p.c -lm -lgl
