Re:2D Terrain generation using midpoint displacement
by Animats on Saturday December 24, 2016 @03:43PM
(#13251549)
Did he just re-invent fractals? That's roughly how most terrain generators work.
[ Parent
| on HN ]
Re:2D Terrain generation using midpoint displacement
by gus_massa on Saturday December 24, 2016 @03:51PM
(#13251569)
I think that midpoint displacement is a well known technique. If that is a fractal or not depends on the definition of fractal that you prefer.
Anyway, it's a nice article. I like the graphs with the different values of the displacement decay powers. It's probably also well known, but the comparison is nice.
Re:2D Terrain generation using midpoint displacement
by cperciva on Saturday December 24, 2016 @05:36PM
(#13251913)
Better terrain generators will use higher-order curves rather than straight lines (i.e., instead of picking an increment for the midpoint and adding a multiple of 1 - |x|, add a multiple of 1 + cos(x)) in order to avoid having visible "corners". And of course terrain generators usually work in two dimensions, which makes this slightly more complex.
But yes, the "pick your dimensionality, randomly adjust the height in the middle, then recurse" approach is very standard.
Re:2D Terrain generation using midpoint displacement
by zubat on Saturday December 24, 2016 @04:26PM
(#13251692)
Diamond square is often swapped out for Perlin noise in terrain generators. They give very similar effects, but Perlin's method is a little more flexible along certain parameters(e.g. arbitrary offsets, zoom-in) while diamond square has more control over the nature of features at different scales, which can be used to make terrain more or less noisy.
Re:2D Terrain generation using midpoint displacement
by smallnamespace on Saturday December 24, 2016 @03:49PM
(#13251564)
Yes, he basically rediscovered a generalization of Brownian motion (for r=sqrt2), which is self similar.
In fact his algorithm is one way to get a Brownian bridge.
Re:2D Terrain generation using midpoint displacement
by DougBTX on Saturday December 24, 2016 @04:14PM
(#13251651)
Yes, I think you could call it a fractal. The Wikipedia page linked to from the article says that this technique is also called a "random midpoint displacement fractal".
Re:2D Terrain generation using midpoint displacement
by DanBC on Saturday December 24, 2016 @06:04PM
(#13252011)
Midpoint displacement is mentioned in The Science of Fractal Images (and the Beauty of Fractal Images), and also in Mandelbrot's book Fractal Geometry of Nature.
From a phone, sorry about upside down: http://m.imgur.com/JGCpnIu
A snippet from "Science of Fractal Images"