If we have a bunch of points that are uniformly spaced, we can squeeze them radially so that they yield a halftoned image. For example, if we have points distributed along a phyllotactic spiral, we can squeeze them to get a skull: How does this work? Math math math. As usual, we want to match […]

# Category: penplotter

## Approximate TSP Paths

Let’s say you have lots of points, and you want to visit them rapidly. And you’re too lazy to solve the full TSP. How well do different approximations work? That is, how far would you have to travel to visit each point? Let’s say you have N points that are uniformly randomly distributed in a […]

## Scribble Art

Let’s scribble! There are other papers that have used scribbling for halftoning images, but I want to add a bit more math. A simple model is to have a circle that travels along a base curve. We can parameterize this as: . To use this for halftoning, we should know the curve length (per period) […]

I’d like to be able to have a region that is densely packed with non-overlapping circles, whose sizes vary spatially in a pre-defined way. There are lots of resources for Poisson-disk sampling, but that doesn’t result in snugly packed circles. Time to do some tinkering! Random search The laziest way to do this: try to […]

Previously, I used single-frequency Fourier noise to do some halftoning. This time, I’ll use broad-frequency noise. I’ll filter 2D white noise with a gaussian with standard deviation . This reduces the high-frequency content. Let’s call the filtered noise , and the gradient-scaled version. Skipping all the tedious probability work, the pdf of the gradient-scaled noise […]

One way to do stochastic halftoning is to draw contours of noise functions. For example, you can make 2D single-frequency Fourier noise, and draw a contour wherever the noise crosses the zero-level. If you do this with wavelength L, over an area of A, the total arc length turns out to be very nearly 2.2*A/L. […]

Imagine that we have a screen door, and we want to push around the wires to make an image. It’s not a simple problem! There’s a fixed number of wires in each direction, so how do we properly distribute them? Let’s define a pair of phase maps for x and y, and . We’ll draw […]

## Spiral Halftoning

Let’s halftone an image with some overlapping wiggly spirals! I want to draw N lines, spiraling out from the center of the image, and have them each slightly offset. With the proper offset, this will create the (approximately) proper darkness. With image darkness k, line width w, and line spacing L, we can get a […]

## Evenly Spaced Streamlines

There’s a whole body of literature out there for illustrating vector fields. One topic is ‘evenly spaced streamlines’: lines that follow a direction field, and don’t get too close to each other. How do we do this? From a starting point, use the midpoint method to figure out the position of the next point. If […]

Stippling is pretty neat. Draw a bunch of points and get an image? I like it. This post works up from basic Voronoi diagrams to anisotropic stippling with multiple dot sizes. I’ll stick to 2D for all this, since I like drawing pictures. Voronoi Diagrams A Voronoi diagram divides up the plane into regions that […]