kyrcha / ama

Ask me anything!
2 stars 0 forks source link

Fractal dimension of coastlines #2

Closed diegopujoni closed 4 years ago

diegopujoni commented 4 years ago

Dear Kyriakos, how are you? I hope everything is OK with you in these strange times.

I have a question about your code to calculate Fractal Dimensions (FD) by box-counting. I am trying to calculate the fractal dimension of cave maps. We have a 2D map of a cave and we want to estimate its fractal dimension.

I managed to reproduce your code using the map of the Greece coastline. Then, I tried to do some experiments and saved your map with a different resolution (720x720) and repeated the process. I also calculated the box count for all 1600px and 720px dividers (please see the map below). I realized that the fractal dimension changes significantly when we choose different points to perform the linear regression, and also when we use images of different resolutions.

Do you know how to choose which data points to use for regression and how to proceed if we have different resolutions?

Thank you very much,

PS: In the graph below, I show the data points for the same map of Greece with 1600px (open circles) and 720px (closed circles). The regression line was adjusted using only the points marked with a cross. image

kyrcha commented 4 years ago

Hi @diegopujoni

hope everything is OK as well.

Well a higher resolution map will give your map a more "edged" and detailed version of the coastline instead of a smoother one of a lower resolution map. Thus the map will more 2D-ish if you know what I mean, giving you a higher fractal dimension. If I could, I would go with the highest resolution possible to get the result closest to reality. Now for choosing the data points even though I don't remember exactly, I believe I chose "in the middle" box sizes, avoiding extremes.

diegopujoni commented 4 years ago

Dear Kyriakos,

Thank you so much for your reply. I'll apply your recommendations.

All the best.