Blog

The Diamond-Square Algorithm for Terrain Generation

The Diamond-Square Algorithm for Terrain Generation

The Diamond-Square Algorithm is the natural first stop for generating artificial landscapes. The algorithm itself is beautifully simple (more details below, and on its Wikipedia page). But a casual implementation ended up not working at all, prompting me to look for an existing implementation to learn from. However, most implementations I found looked hideously complicated (or just hideous), not necessarily correct, and/or used out-of-date programming languages and styles. It therefore seemed like a good idea to create a clean, simple “reference” implementation of this algorithm, using a contemporary and widely known programming language and style.

"That's funny..."

The most exciting phrase to hear in science, the one that heralds new discoveries, is not “Eureka!” (I found it!) but “That’s funny…”.

Unix Tools Today

I learned Unix almost 30 years ago, while attending graduate school in the early 90s, from a now long-obsolete book entitled “Unix for the Impatient”.

Some of the tools and commands I learned back then have long since become irrelevant (ftp, telnet, cvs, biff — remember biff?). Others, although long in the tooth, continue to serve me well every day (emacs, tcsh, cc). And yet a third group seems to be more important than ever (such as tar, which is the basis for Docker images).

Book Review: Two Books on Analytic Number Theory

Analytic number theory is the application of methods from analysis to the study of integers, in particular primes. This may seem paradoxical: at the heart of analysis lie notions of continuity and differentiability — and what could be more discrete and discontinuous than the set of primes?

Euler's Product

Everyone knows Euler’s famous identity, linking the imaginary unit to trigonometric functions:

$$ \mathrm{e}^{\mathrm{i} \pi} = -1 $$

But another remarkable identity is also due to Euler, this one linking the set of prime numbers to an analytical function: