algorithm - Break a rectangle into randomly shaped polygons -
just title says, need break rectangle randomly shaped polygons.
example, 7 polygons:
+--------+--------+ |\ | 2 | | \ 1 |''--..__| | ------| 5 | | 3 / \________| | / /\ 6 | |__/ 4 / \______| | / 7 | +-----+-----------+
i don't know if there's algorithm out there this, can't seem head around this.
i don't particularly care language answer in, i'll implementing in java/swing.
you may drop bunch of random points on rectangle, , calculate voronoi diagram.
here java/swing implementation.
i did samples (but using mathematica, not above implementation)
hth!
Comments
Post a Comment