Categories
fluids halftoning penplotter

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 […]

Categories
etcetera

Angled Splitulate

I’ve refined image approximations with rectangles and triangles. Let’s try with splitting regions into two with a straight line, and filling each part with the average color that they’re covering. This is the same basic idea as the rectangles, except that now the line can be at any angle, rather than just vertical or horizontal. […]

Categories
halftoning

Halftoning with Reaction-Diffusion Patterns

The easiest way to make a reaction-diffusion pattern involves two blurs and a comparison. It doesn’t give the full fancy dynamics of other approaches, but it works well for halftoning. This simple method avoids differential equations, and works with just image filtering. At each step, the activation chemical spreads with radius , and the inhibition […]

Categories
etcetera

Image Triangulation: Voronoi Method

Voronoi diagrams are great, so let’s use them to stylize images. First, let’s just throw a bunch of points on an image, and compute the Voronoi diagram. Then for each cell, we fill it with the average or median color within: Hmm. That’s not great. It doesn’t pay attention to the edges at all, and […]

Categories
etcetera

Image Triangulation

Previously, I split an image into a bunch of rectangles. What about using triangles? This requires more thought, as it’s a little trickier to divide up the plane using triangles. The natural solution is to keep track of a set of vertices, then use a Delaunay triangulation to split up the image. First, let’s do […]

Categories
etcetera

Image Quadrangulation

I want to represent an image with a bunch of rectangles. Let’s say that each shape has constant color, as a start. First, fill a rectangle with the average color that it covers. That’s the initial approximation. Wherever the error in a rectangle (between the original image and the approximation) is too big, subdivide that […]

Categories
etcetera

Pulled String Art

Check out this art style! They dip a string in ink, lay it on a page, fold the page over, and pull the string out of the bottom. It leaves nice floral patterns with the ink, and is pleasantly complex and organic. I wanted to mimic this style algorithmically, so the first thing that I […]

Categories
etcetera

Solving Tic Tac Toe, Making it Interesting?

Tic Tac Toe (TTT) is a minimally complicated game, so it is relatively easy to find all possible moves and see which will lead you to a victory, tie, or loss. I’ve never solved TTT before, so I threw together some code to do that! Solving Tic Tac Toe Without removing boards that are effectively […]

Categories
halftoning penplotter

Modfied Voronoi Diagrams and Stippling

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 […]

Categories
etcetera

Messing with Image Classification

There’s so much buzz about image recognition these days, I felt like I wanted to join in. Long ago, I saw an excellent project by Tom White in which he used image classification to generate abstract drawings reminiscent of an object. Basically, he made a feedback loop between an image generator and the image classifier, […]