To get a seamless texture behind a Box2D world I need to find the outline of a number of arbitrarily placed rectangles. Tricky! Please see illustration below. After a lot of tinkering and Googling this problem is beating me. Any math geniuses out there who could help?
Comments
https://deluxepixel.com
@antix: The edges should never overlap, but I find that the conversion from Rube sometimes isn't as exact as I'd like, so there are small overlaps sometimes.
In other news, I miraculously managed to find Lua code to sort the points clockwise. Initial tests appear to indicate it works! Code here: http://stackoverflow.com/Questions/6989100/sort-points-in-clockwise-order
Generally most systems breakdown concave shapes into multiple convex ones for processing (or so it seems).
Likes: totebo