algorithm - Randomly dividing a 2d complex enclosed region -
first define:
- region: big stuff manually created want divide.
- zone: small stuff want generate.
i have map. world map in fact. , want divide small zones. size of zones dependent on region zone in. instance small europe (maybe europe have 200 zones) couple of huge ones atlantic ocean.
i can manually create points enclose region. create regions each big space want have different size other spaces. instance create enclosed region europe. got butch of (latitude, longitude) points defining limits of europe region. shape of course not regular , there holes in middle of (i don't want create small zones on mediterranean sea big one). got huge 2d shape filled zones.
zones n-sized polygons, number of sizes can randomly chosen or subject other constraints. area of each zone limited random (like 50 plus/minus 40%) although constraint again can relaxed (as exception, not rule). zones can not overlap , whole region must divided.
the obvious question, algorithm can used solve problem? have problems determine if given point inside or outside enclosed region.
me, i'd other way round, put point in (approximate) centre of zones , compute voronoi diagram of resulting point set.
edit: in response @unreason's comments. don't claim computing voronoi diagram answer question asked. claim computing voronoi diagram suitable method dividing planar map zones defined closeness point. may, or may not, satisfy op's underlying requirement , op free use or ignore suggestion.
i implied following, make explicit: op, if taken suggestion, should define points (lat,long) @ 'centres' of each zone required , run algorithm. voronoi diagrams not computed iteratively, if op doesn't solution op have shift points around , re-compute. guess feasible write routine this; hard part, ever computational cartography, in defining computable rule how trial solution fits (quasi-)aesthetic requirements.
i wouldn't bother, i'd use country capital cities points zones (relatively densely packed in europe, relatively sparse in atlantic) , let algorithm run. job done.
perhaps op might use locations of cities populations on 5 x 10^5 (there 200 of in europe). or other points.
oh, , computing voronoi diagram isn't random either, it's entirely deterministic. again, may or may not satisfy underlying requirement.
Comments
Post a Comment