Boost logo

Boost :

Subject: Re: [boost] [polygon] tutorial done and library ready for release
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2010-05-25 20:25:41


Dean Michael Berris wrote:
> How about the simple problems like finding out whether two lines
> intersect, the resulting area of the union of two or more polygons, or
> maybe the convex hull problem? Those would really be interesting
> problems to illustrate solving using your library and would generally
> be more suitable to demo how to use and leverage the data structures
> and algorithms in the library.

I think you have a good point that the tutorial should be something really interesting to show the power of the library. To that end I implemented today Minkowski sum of two polygon sets. Minkowski sum of two polygon sets is a generalization of Minkowski sum of two polygons. In the code I call it convolution of two polygon sets. If you look at the API of the library I provide convolve(point, point), convolve(polygon, point) and convolve(rectangle, rectangle). Using the attached code I could provide convolve(polygon, polygon), convolve(polygon_set, polygon) and convolve(polygon set, polygon set).

I didn't comment the code to explain the intuition behind the algorithm, but there isn't much code there, just 82 lines for the implementation itself, so it should make for a nice short tutorial complete with pictures and detailed explanation of what minkowski sums are and how my algorithm and the implementation of it work.

Does solving this problem meet your expectations for a good tutorial for the library?

Regards,
Luke




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk