Data processing in R
Using spotty noise and the vectorized recursive function "block" within r_terrain_demo.R, we can create heightmaps in R. Then we can pass a blurring kernel over the spotty terrain several times, transforming it from a spotty discrete surface into a blurry one.
The R graphics libary (RGL) can be used to display the 2D heightmap as a 3D surface.
Occasionally it is useful to have a group of points which are not overlapping, but are otherwise random. See . While there are very complicated implementations of blue noise out there, they are often unnecessarily difficult for applications outside statistics research.
We can use an equation like
to give a grid of points in 2D (or with a few easy changes, 3D) space.
Then using we can draw a few edges between nodes/points.