Skip to content

Java library used to approximate a polygon with rectangles

Notifications You must be signed in to change notification settings

pborissow/Poly2Rect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Poly2Rect

Used to approximate a polygon with rectangles - a process known as rectangular decomposition. This algorithm starts by computing the largest inscribed rectangle within a convex hull. Rectangles are generated around the inscribed rectangle which provides the general shape of the polygon.

Poly2Rect Example

For best results, this function can be called iteratively by clipping the source polygon with rectangles generated by the getOverlappingRectangles() method and feeding the clipped polygons into new instances of this class.

Credits

Possible Future Enhancements

Instead of relying on an inscribed rectangle, break up polygon into convex regions using a library like Bayazit

About

Java library used to approximate a polygon with rectangles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages