this post was submitted on 14 Dec 2024
455 points (94.3% liked)

Map Enthusiasts

3606 readers
239 users here now

For the map enthused!

Rules:

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] mindbleach@sh.itjust.works 19 points 1 week ago (2 children)

Intelligence is knowing I could optimize this with annealing and a decent error function.

Wisdom is deciding not to get nerd-sniped like that.

[–] DKKHGGGj@sopuli.xyz 6 points 1 week ago (1 children)

I feel a tingling in my hands. An algorithm to optimize for n arbitrary polygons

[–] mindbleach@sh.itjust.works 2 points 1 week ago

I saw this and had flashbacks to a thousand Mona Lisas.

[–] mindbleach@sh.itjust.works 4 points 1 week ago (1 children)

Apparently I am a fool.

What you'd do is, you pick a representative set of points from a world map, e.g. by reducing it to a low resolution, or by sampling with blue noise. Each point gets a 32-bit integer. For up to 32 circles, you check if each point is inside or outside the circle, and mark one bit accordingly. Every region created by these overlapping circles now has a unique ID for all points inside that region.

Scoring groups points by ID, finds whether each group contains more land or water points, and counts all the points outside that majority. That sum is your error.

[–] OlPatchy2Eyes@slrpnk.net 3 points 1 week ago

Nerd Lemming snaps in 3 hours under zero pressure