Timeline for Understanding this terrain intersection algorithm
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 4, 2021 at 16:49 | comment | added | DMGregory♦ | It's just a question of how many cells you want to examine. Imagine you have a 2k x 2k heightmap with a mountain in the north-east corner, and a flat plain around. You fire a ray toward the mountain from eye height above the plain at the south-west corner. Do you want to iterate over all 2000 cells of the diagonal with Bresenham's algorithm? Or do you want to quickly reject three quarters of the map using the quadtree, and search only the cells close to the actual mountain? | |
| Mar 4, 2021 at 16:39 | comment | added | Sejt | By reading more forward in the PDF, at section 3.4 the author talks about an algorithm (named: Algorithm for computer control of a digital plotter by J. E. Bresenham) that can tell which heightmap element is the ray on. It came to my mind why can't we just use this thing for the entire map then? It seems easier and faster to just get the ray and check for intersection with the plotted triangles instead of keep dividing the map into quads. Maybe do you have a theory for this? | |
| Mar 3, 2021 at 13:15 | comment | added | Sejt | Thank you very much :) | |
| Mar 3, 2021 at 13:15 | vote | accept | Sejt | ||
| Mar 2, 2021 at 12:38 | history | answered | DMGregory♦ | CC BY-SA 4.0 |