You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To slice polygons into N pieces, we are using the same method as transformr and flubber, which is to
triangulate a polygon
take the smallest triangle (or, after some triangles have been merged, polygon)
merge it with the first found neighbor
compute area of the resulting polygon
repeat step 2 - 4 until the number of polygons/triangles is equal to N
This is pretty slow. I wonder if there is a faster way to do this. PolyK seems to be able to slice polygons without triangulation (see this, doesn't support holes tho). If we could figure out a quick way to find a line that approximately cuts a polygon in half, we could just keep cutting the biggest polygon in half until we have the desired number of pieces N. I suspect that to be faster.
The text was updated successfully, but these errors were encountered:
To slice polygons into N pieces, we are using the same method as
transformr
andflubber
, which is toThis is pretty slow. I wonder if there is a faster way to do this. PolyK seems to be able to slice polygons without triangulation (see this, doesn't support holes tho). If we could figure out a quick way to find a line that approximately cuts a polygon in half, we could just keep cutting the biggest polygon in half until we have the desired number of pieces N. I suspect that to be faster.
The text was updated successfully, but these errors were encountered: