This page contains a wide variety of small projects and writeups I’ve created over the years. They mostly ride the line between mathematics and graphics. Though I wouldn’t necessarily consider it a success, the intent has been to focus not only on the math and pushing the boundaries of visualization on the web, but also on finding ways to more effectively communicate the underlying concepts. As a result, a pretty good share of these writeups are found on Observable since it’s quite simply the best environment I’ve found for exploring and communicating interactive technical content on the web.
I hope you find something interesting!
Comments? Questions? Let me know @rickyreusser.

The n+1th iteration of my approach to domain coloring for complex functions, this time with a function parser to automatically turn a mathematical expression into GLSL code.

There are many good reasons to compute Voronoi diagrams in the geometric manner, but it’s also fun and useful to compute it as a raster image effect. This notebook computes Voronoi diagram images in log2(size) passes using the Jump Flooding algorithm.

While a circle in two dimensions cannot, a sphere in three dimensions can be smoothly turned inside-out! An interactive walkthrough to help visualize the eversion of Bednorz and Bednorz.

I was quite surprised to learn that while Mach angles depend on an object’s speed, surface waves in water work differently and form a wake which doesn’t depend on the speed!

The chaotic baker’s map results when you cut and fold dough. This notebook performs the process and allows to explore different maps.

Transparency is not something which comes easily when rendering models on a GPU. This notebook illustrates a simple shortcut toward displaying transparent 3D surfaces with a two-pass rendering technique.

A quick check to verify visually that random points are distributed evenly on the surface of a sphere.

Classic boids requires some sort of strategy for nearest-neighbor lookup, whether that’s a tree or brute-force pairwise interactions. This notebook follows a Particle Mesh method strategy and uses a grid to transmit locally averaged properties to neighboring boids.

A reproduction of Figure 2 from Sawhney and Crane’s oustanding paper, Monte Carlo Geometry Processing. My very first foray into SDF rendering with sphere-tracing!

Toilet paper tubes have the curious property that you can flatten them, cut out loops, and link the loops together without fasteners. This notebook provides some instructions and implements a simple point and click editor to construct your own!

A 3D WebGL simulation of Gray-Scott reaction-diffusion. Even though WebGL 1 only has two-dimensional textures, with enough bookkeeping, they work perfectly well for three-dimensional simulations of modest size.

A response to a question about the quickest way to separate a cloud of points into two groups. Power iteration would be a bit quicker, but Principal Component Analysis (PCA) is a good start.

One million double pendulums!

You’re likely to get scolded for using a floating-point variable to represent an integer, but floating-point represents most integers perfectly well. Scroll through all of the integers representable in single-precision floating point!

Half-precision floating-point can be surprisingly difficult to work with. This notebook plots all possible numbers with the special cases illustrated clearly.

A Shadertoy implementation of my domain coloring technique using rectangular contours.

A Shadertoy implementation of my domain coloring technique using polar contours.

An input field for Observable notebooks which allows you to toggle the bits.

Numerical computing in JavaScript remains difficult due to the lack of robust, complete libraries. This notebook explores compiling a subset of the Eigen linear algebra library to WebAssembly using Emscripten and tries to remedy some of the ergonomic memory management issues which result.

N-body simulations get expensive very quickly, with the number of interactions growing with O(n2) . This notebook takes a shortcut and uses the somewhat inaccurate Particle-Mesh method to simulate 2D Newtonian gravity on a grid. It solves Poisson’s equation via an FFT and plots the results entirely on the GPU.

This notebook collects over 2200 periodic, planar three-body orbits and explains one of the normal topological ways to classify them.

Drawing lines is indeed hard. This notebook uses instanced rendering to turn simple vertex data into a continuous line. To simplify things, and since for many cases miters are not necessary, we simply draw a two-triangle rectangle per line segment.

Students of complex analysis will recall that a path integral quickly tells you how many roots are inside a given contour, but this notebook walks through the method of Delves and Lyness which transforms integrals around a contour into a polynomial whose roots are exactly the encircled roots!

Domain coloring for complex-valued functions is tricky since the function and rate of change may vary over many orders of magnitude. This notebook iterates on the previous technique and tries out automatic differentiation and screen-space derivatives to compute the rate of change and automatically scale contours.

This notebook explains how to use the ANGLE_instanced_arrays WebGL extension to draw a lot of circles to the screen in a very performant manner.

This notebook solves the 1D Schrödinger Equation by trivially stepping it in the frequency domain and plotting the result in the physical space. The main goal is to an exercise in computing and plotting result from start to finish entirely on the GPU.

Dat.gui is the gold standard in simple control GUIs. This notebook illustrates a prototype libary based on Preact and with the goal of being simple and extensible.

A second set of multi-scale Turing patterns

We typically just send triangles to the GPU and draw them on the screen. This notebook uses instanced rendering to draw plain, unadorned mesh data as normals with arrowheads and foreshortening.

An implementation of multi-scale Turing patterns following the method of Jonathan McCabe.

My favorite WebGL extension is OES_standard_derivatives, used for computing screen-space derivatives. This notebook illustrates its utility in drawing constant-screen-width contour lines of any sort in a fragment shader.

In which I have fun rediscovering Principal Component Analysis by stating what I want from a problem, realizing Lagrange multipliers actually work, then finding out it’s just Principla Component Analysis on the normal vectors.

This notebook represents an early attempt at the domain coloring technique for complex analytic functions. It uses the contour line technique but depends a great deal on the particular scale of the functions plotted.

A pretty good portion of the material on this site is implemented in WebGL using Mikola Lysenko’s oustanding regl library. This post walks through my still-favorite method of getting off of the ground in and into regl.

This post exists because I wish someone had sat me down and told me half of these things on Day One of using React Native.

A walkthrough of how I got started and what motivates me to seek better ways to communicate.