Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wow, 95 days!! Who would have thought that Colombia had the second highest, I just assumed it'd be another part of the Himalayas. I'm the author of the post, I suppose there's a chance I might find something different if I'm literally calculating every single line of sight on the planet? As there's a chance that the longest line isn't from a peak or plateau?

I'd love to geek out with you about your journey and thoughts if you're up for it?



> As there's a chance that the longest line isn't from a peak or plateau?

Is there such a chance? I'm struggling to think what this could look like. If the furthest point you can see is in a bowl or a valley, why can't you see all the way to the far side of the valley? I think we can rule out topographic ridiculousness like a mountain with a hole in it that you can see through.

OK, instead of a peak or a plateau, perhaps the longest line could be from a ridge in a saddle. So it's a peak when approached from one orientation (say north/south) but a trough when looking east-west. You can't see the higher ground to the east and west because it's hidden behind some other mountain.


I wonder if this is related to the so-called coastline paradox? https://en.wikipedia.org/wiki/Coastline_paradox In other words, what is the criteria for filtering out good and bad elevation candidates?

Does it help imagining this on a tennis ball? Let's say we make 2 pyramid-like blobs of plasticine and put them on opposing sides of the tennis ball. Now we slowly move them closer to each other until they can both just see other. Is it not possible to form the pyramids in such a way, that the first point of visibility is the pyramids' bases, and not their peaks?

For me it comes down to the fact that although it might seem obvious what a peak is when you see one, I don't think there's any meaningful way to geographically define one. They're always just _locally_ higher points.

BTW this is exactly why I wrote the post, it's a fairly unique problem, and I'm sure I've made some problematic assumptions.


If you imagine having a very deep hole in the ground, the longest sight line would be from the lip to the bottom. If you then dig a small hole at the bottom, you wouldn’t be able to see the bottom of the second hole, but only some part of the wall

Similar in reverse, if the pyramid had a false peak (a inflection place where topology changes from steep to less steep), it could obscure line of sight between the real peak, if the angle formed by the line of sight between the two distant peaks tries to intersect the intermediate inflection point


I can imagine some shapes like this in theory, I just think we can rule them out in practice.

For the hole example, we know there aren't any holes 500 km deep. For the pyramids, we know the line of sight is very close to flat (it's at least 500 km long and less than 10 km in elevation change). If a false peak prevents you from seeing the real peak, the angle of the mountain above the false peak is shallow enough that you can call it a plateau.


It'd be a pleasure to chat about this! Hit me up by email: m at zorinaq dot com

Actually, to be exact: I just checked my data and I forgot that technically the 2nd and 3rd longest sightlines I discovered are slight variations of the Pik Dankova sightline. 7 km east of this peak is another mountain with two spots from which there are two sightlines of 521.1 and 510.49 km ending in the same mountain range in China (a few hundred km away from the end point of the 1st sightline.)

Then the 4th longest sightline I found is the one that's arguably unique: 510.45 km, fully contained within China in the Kunlun Mountains from 38.614706,75.184529 to 36.517500,80.333333. So that's an interesting find.

Then my 5th, 6th, 7th, 8th longest sightlines are again slight variations of the 1st Pik Dankova sightline.

Then my 9th longest sigthline in the one in Colombia I mentioned.

It's very possible you could find different results and new longest sightlines, so I encourage you to continue your own research.

For starters here is a limitation of my implementation: my heuristic for finding a potential viewpoint (mountain peak or ridge of a plateau) is imperfect: in the DEM, a tile is considered a potential viewpoint if it is higher than or equal to it's 8 neighbors, and if it is strictly higher than at least one neighbor. Think about a group of 3x3 tiles. They are all the same height, except one tile on the edge of the group that is slighly lower than the others. Then in this case, the central tile is a potential viewpoint because we could have a sightline standing on this central tile, looking over the one neighbor tile that is slightly lower. That would be the case when standing on the edge of a plateau right next to the start of a valley.

But I can think of at least one case where I would accidentally dismiss potential viewpoints: if, when standing on this ridge, the tile behind us is slightly higher (even if it's just by 1 meter), then my heuristic would dismiss the central tile as a potential viewpoint, because my thought was the tile that is sligthly higher is going to be selected by my heuristic as a (better) potential viewpoint instead. But, in reality, if the tile behind us is only a few meters higher, then it is not high enough to look over our initial tile, then over the start of the valley. In that case the central tile is a viewpoint but would be dismissed by my heuristic. This is a very narrow corner case that probably doesn't affect my results, but I am not 100% sure. If the height difference is about 3 or 4 meters or more, the tile behind us would definitely have a clear and longer sightline, so my heuristic isn't breaking anything.

Anyway my whole project was just a weekend thing so I didn't care to be very precise. But now seeing your effort is renewing my interest in fixing my code. Oh and I should definitely port this to GPU as this workload is 100% compute-bound, mostly, sin, cos, sqrt and divisions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: