Wednesday, June 20, 2018

[dvdotqbu] Life-sized procedurally generated world

Earth surface area is 5.1e14 m^2.  A high-resolution display has resolution 200 dpi, or 0.000127 meters per pixel.  We consider the task of generating a virtual world the size of earth at that resolution.

Earth surface area at that resolution would have 3.16e22 pixels.  This is equivalent in area to a circle with radius 1.00e11 (10^11) pixels.

Fractal terrain generation (e.g., plasma fractal) is ideal for this kind of task: terrain can be computed on demand at the resolution and location needed, never having to precompute nor store.  However, we will take a detour and consider the Mandelbrot set, a fractal different from the plasma fractal.  The Mandelbrot set has a fixed size, which is useful to get a sense of the scale needed to generate 10^22 pixels.  The Mandelbrot is contained within a circle of radius 2, so computing the Mandelbrot set with pixel spacing 2e-11 would yield 3.16e22 pixels.  (Incidentally, this spacing is well within double precision's 15 significant digits of precision, so no need for arbitrary precision arithmetic.)

No comments:

Post a Comment