Imagine an island (e.g: Bermuda, Hook Island, Sardinia, etc)
Draw a square or rectangle approximating all of the land not currently touching water (e.g: All pixels must not contain water)
Draw a larger red square encompassing the smaller red square or rectangle.
Subtract any brown, green, or "land" pixels, and add them to the total count of Box_1.
Remove green, blue and other "water" pixels from Box_2.
Your final result will be a red outline precisely mapping the coastline of the island in question. You can now measure distance by taking pixels and multiplying by the scale of the zoom-distance (parralax).
This measurement is a factor of pixel size. As resolution increases and pixel width approaches 0, the shoreline length approaches infinity.
Though I guess you'd eventually run into the problem of clearly defining the shoreline once you're distinguishing between water molecules and grains of sand. is the water between the sand molecules part of the ocean? How concave is the boundary on the stretches between sand grains?
And of course, it's dynamic as tides and waves change it. And how does wet sand due to rain play into it - we're now having to differentiate based on salinity of water.
Over a very broad range of scales (like, from the scale of 10km down to the scale of 1mm) the number of boundary pixels of a natural shape like an island increases according to a power law as you increase the resolution.
This means that your approach doesn't give you an objective value because it depends so strongly on the resolution.
This way of computing the length of a boundary leads to the concept of box-counting dimension. When you increase the resolution of the pixel grid, you'll get a larger number of pixels on the boundary. Keep refining the grid many times. Graph the log of the total number of pixels against the log of the number of boundary pixels. The box counting dimension is the slope of that graph.
Why would we call this "dimension"? Because if you do this to a line, the slope is 1, and if you do it to a square, the slope is 2.
you could approximate it using Taylor expansions, although this generally isn't a rapidly convergent series. You might take a fancy for some other numerical method that would get really precise digits really quickly...
40 Comments
Big_Boss_77@fedinsfw.app · 53 pts · 80d
Reminds me of the conundrum of being unable to measure shoreline
Akasazh@lemmy.world · 15 pts · 80d
Alan Davies (of qi fame) once made a documentary where he tried to measure the length of a piece of string, the shoreline issue also comes up.
https://www.bbc.co.uk/programmes/p00whwmc
stupidcasey@lemmy.world · 6 pts · 80d
Just get a small enough ruler either you'll measure the shoreline and disprove calculus or you'll solve quantum physics.
marcos@lemmy.world · 3 pts · 80d
Well, if you get a small enough ruler you will already disprove quantum physics. No need to use it for anything.
Klear@piefed.world · 2 pts · 80d
At best you'll disprove shoreline.
Naz@sh.itjust.works · 4 pts · 80d
Imagine an island (e.g: Bermuda, Hook Island, Sardinia, etc)
Draw a square or rectangle approximating all of the land not currently touching water (e.g: All pixels must not contain water)
Draw a larger red square encompassing the smaller red square or rectangle.
Subtract any brown, green, or "land" pixels, and add them to the total count of Box_1.
Remove green, blue and other "water" pixels from Box_2.
Your final result will be a red outline precisely mapping the coastline of the island in question. You can now measure distance by taking
pixelsand multiplying by the scale of the zoom-distance (parralax).mushroomman_toad@lemmy.dbzer0.com · 29 pts · 80d
This measurement is a factor of pixel size. As resolution increases and pixel width approaches 0, the shoreline length approaches infinity.
Though I guess you'd eventually run into the problem of clearly defining the shoreline once you're distinguishing between water molecules and grains of sand. is the water between the sand molecules part of the ocean? How concave is the boundary on the stretches between sand grains?
CannonFodder@lemmy.world · 8 pts · 80d
And of course, it's dynamic as tides and waves change it. And how does wet sand due to rain play into it - we're now having to differentiate based on salinity of water.
Naz@sh.itjust.works · -1 pts · 80d
Oh that's funny. I see what you're doing 😆
Philosophers are no longer permitted on the beach 🚧 (/s)
RavingGrob@lemmy.dbzer0.com · 8 pts · 80d
https://en.wikipedia.org/wiki/Coastline_paradox
FishFace@piefed.social · 5 pts · 80d
Over a very broad range of scales (like, from the scale of 10km down to the scale of 1mm) the number of boundary pixels of a natural shape like an island increases according to a power law as you increase the resolution.
This means that your approach doesn't give you an objective value because it depends so strongly on the resolution.
This way of computing the length of a boundary leads to the concept of box-counting dimension. When you increase the resolution of the pixel grid, you'll get a larger number of pixels on the boundary. Keep refining the grid many times. Graph the log of the total number of pixels against the log of the number of boundary pixels. The box counting dimension is the slope of that graph.
Why would we call this "dimension"? Because if you do this to a line, the slope is 1, and if you do it to a square, the slope is 2.
More information: https://en.wikipedia.org/wiki/Fractal_dimension?wprov=sfla1
iusemybrain@sh.itjust.works · 0 pts · 75d
you could approximate it using Taylor expansions, although this generally isn't a rapidly convergent series. You might take a fancy for some other numerical method that would get really precise digits really quickly...
ashenone@lemmy.ml · 48 pts · 80d
Glad I made it to the end. Totally worth it
Uebercomplicated@lemmy.ml · 12 pts · 80d
This is an evil comment
iusemybrain@sh.itjust.works · 0 pts · 75d
loves to see the world burn
Aarkon@discuss.tchncs.de · 40 pts · 80d
Fractal shorelines. Always a pleasure to behold.
applebusch@lemmy.blahaj.zone · 11 pts · 80d
hmm yes this beach is made of beach
0ops@piefed.zip · 4 pts · 80d
Son of a beach
ivanafterall@lemmy.world · 26 pts · 80d
Does a nude woman jiggling down a beach not count as NSFW anymore!?
MeatPilot@sh.itjust.works · 25 pts · 80d
Makeshift@sh.itjust.works · 23 pts · 80d
This successfully hurt my brain.
raspberriesareyummy@lemmy.world · 20 pts · 80d
No I can't see it. Anyone willing to enlighten me?
Edit: nm, didn't realize it was a gif.
Treczoks@lemmy.world · 2 pts · 80d
Same here.-
Raiderkev@lemmy.world · 17 pts · 80d
It took me a while, but the payoff when it finally gets there is great.
Imke@feddit.org · 14 pts · 80d
You fucker
Admetus@sopuli.xyz · 10 pts · 80d
Infuriating but pretty cool
Zier@fedia.io · 9 pts · 80d
It's Fractal Beach, DUH!
gandalf_der_12te@feddit.org · 8 pts · 80d
infinite real estate! how practical :D
pineapplelover@lemmy.dbzer0.com · 8 pts · 80d
This made me research the coastline paradox
https://www.youtube.com/watch?v=7dcDuVyzb8Y
MathiasTCK@lemmy.world · 3 pts · 80d
This made me research the coastline paradox
https://en.wikipedia.org/wiki/Coastline_paradox
Resonosity@lemmy.dbzer0.com · 5 pts · 80d
Thanks I hate it
melsaskca@lemmy.ca · 4 pts · 80d
Those are turtles!
SaltyIceteaMaker@lemmy.ml · 4 pts · 80d
damn. only found out its a gif due to other comments, for me its just a static image
Arachnidbrilliant@lemmy.dbzer0.com · 4 pts · 80d
Alright….. I fell for that.
tired_fedora@lemmy.ml · 3 pts · 73d
This would make for a pretty cool SCP: A place or a person whom you can't get super close to, because space around them behaves in a fractal manner.
Glitterkoe@lemmy.world · 3 pts · 80d
Unexpected Dumpert.nl
Phantaloons@piefed.zip · 3 pts · 80d
computer, enhance photo...
Misty@lemy.lol · 3 pts · 80d
I'm still squinting to see...
helpImTrappedOnline@lemmy.world · 2 pts · 80d
Crime shows; Pull up the satilight view. Zoom in. There, what's that spec? Enhance. There's our guy, move out!
halfapage@lemmy.world · 2 pts · 80d
putitoutwithyourbootsted@piefed.social · 2 pts · 73d
I do not like this one bit