Boost logo

Geometry :

Subject: [geometry] Finding a boost::equal simplified polygon
From: Claus Christmann (hcc_at_[hidden])
Date: 2013-10-23 10:47:22


Hi

I am looking for a method for finding boost::euqual polygons. The problem I am
facing is that my code creates unnecessarily complex polygons of the type

<ascii art>
A------------B
| |
| D-------(C,E)
| \
G--------------F
</ascii art>

where the vertex D sits inside the polygon. Technically the polygon
(A,B,C,D,E,F,G,A) is boost::equal to the polygon (A,B,C,F,G,A). Could anybody
point me to how I could write/get/find/have an efficient way to get the
'simplified' (A,B,C,F,G,A) from the 'complicated' (A,B,C,D,E,F,G,A)?
Note though that the 'spike' to the interior can have several (coinciding)
vertices.

My current approach checks all vertices for colocation and then computes the
area of the ring spanned by all the interim vertices ((C,D,E) in the above
example). Does anybody have a better idea?

Thanks,

Claus

-- 
Claus Christmann
UAV Research Facility
Georgia Institute of Technology
http://uav.ae.gatech.edu



Geometry list run by mateusz at loskot.net