I’ve been absent mostly due to lazyness (also I’ve been having lots of fun outdoors see http://picasaweb.google.com/Bryan.W.Bell). I’ve tried using CGAL. But everytime I end up quitting in disgust after looking at code like the following

template<class Kernel, class Container>

Polygon_2<Kernel, Container> rotate_polygon(const Polygon_2<Kernel, Container>& p, Direction_2<Kernel> dir){

CGAL::Aff_transformation_2<Kernel> t(ROTATION, dir, ERROR_FACTOR);

return CGAL::transform(t, p);

}

I hate working in an environment where half of your mental energy is spent parsing the syntax of the code. After years of working in good environments such as python and C#. The above code is no fun to look at.

For fun I’ve attached a figure of the typically problem when fitting polygons

### Like this:

Like Loading...

python cgal is your friend:

http://cgal-python.gforge.inria.fr/

POlygon_2 you can find here:

http://cgi.di.uoa.gr/~compgeom/pycgalvisual/polygon.shtml

enjoy!

Thanks for the link. I was aware of the cgal-python binding but not of the patch to add the intersection functions.