3 ms·
Many folks looking for a Perlin-like effect end up using the diamond-square(or "midpoint displacement") algorithm, which has a similar look but a somewhat simpl
by chipsy 10y ago
Many folks looking for a Perlin-like effect end up using the diamond-square(or "midpoint displacement") algorithm, which has a similar look but a somewhat simpler implementation:
For each segment take the midpoint of the linear interpolation and add noise at a smaller magnitude. Recurse in until you are at the desired scale. In 2D, flip the sample points between a "square" pattern and a "diamond" pattern each time to avoid a boxy tiled look.
The biggest downside of this method is that it's much less flexible about scaling: to get more resolution you have to double each dimension.