3 ms·
I remember learning about midpoint displacement as a teen and having its recursive implementation blow my mind. At the time, I don't think I could ever implemen
by munificent 11y ago
I remember learning about midpoint displacement as a teen and having its recursive implementation blow my mind. At the time, I don't think I could ever implement it correctly because, like Steve notes here, most explanations really elide about bunch of details around how you do it. In particular, they aren't clear how you do two "stages" of midpoints: corners to sides, then sides to center.
Much later, I got it working, but I was disappointed with the visible seams it tends to lead to. After some trial and error, I came up with an algorithm I liked better for the game I was trying to write at the time.
I thought it was cool enough that I wrote a little tutorial. It's the very first piece of writing I ever put on the web, I think. It's still online (though, alas, I lost my old robot-frog.com domain ages ago):
http://stuffwithstuff.com/robot-frog/3d/hills/index.html http://stuffwithstuff.com/robot-frog/3d/hills/index.html
- robohamburger 11y agoI had a similar experience writing a terrain engine using the quake gl mini-drivers. That was a fun summer! I never managed to make an actual game out of it though... It seems like these days at least a noise function like perlin or simplex are far better. I doubt I would have understood those at the time though.