It started with this.

Naturally, whenever I see something cool, my programmer instinct kicks in and makes me want to recreate it. Then, after about 3 hours of fucking around, half-watching some youtube videos on graph theory and learning Processing, cause it seems like the kind of thing to do, phase 2 of the programmer instinct kicks in which says:

“Well. It’s not exactly the same, but this is pretty cool too.”

The renders below are based on this work/blog-post by Anders Hoff and this work by Manfred Mohr.

The basic idea is: Generate a grid of points (in most of my examples it’s 4x3) and draw an arbitrary number of lines between a random point A and point B. A circle is drawn when point A and point B are the same. Then repeat for the amount of “characters” you want to draw.

int i = 0;
for (int y = 0; y < gridsize_y; y++) {
    for (int x = 0; x < gridsize_x; x++) {
        float xpos = grid_width / (gridsize_x - 1) * x;
        float ypos = grid_height / (gridsize_y - 1) * y;
        grid[i] = new Point(startx + xpos, starty + ypos);

for(i = 0; i < number_of_lines; i++) {
    Point a = get_random_point(grid);
    Point b = get_random_point(grid);
    if(a == b) {
        int strokeWidth = (weighted_bool(0.7))? fat_line : thin_line;
        // weighted_bool just randomly returns true or false 
        // depending on the given probability
        int fill = (weighted_bool(0.2))? 180 : 0;
        int ellipseSize = (weighted_bool(0.4))? big_circle : little_circle;
        ellipse(a.x, a.y, ellipseSize, ellipseSize);
    } else {
        int strokeWidth = (weighted_bool(0.4))? fat_line : thin_line;
        line(a.x, a.y, b.x, b.y);

I see you judging my code, and I don’t care.

In and of itself: not rocket science, but it’s an interesting jumping off point for further experimentation. Plus: it already looks awesome.

Check out the measly source code if you want to make some drawings for yourself or fiddle with the settings.

It’s build in Processing/Java, which was also somewhat a first for me. It kind of reminds me of the good ol’ Flash/Actionscript days, being able to very quickly and simply set up interesting graphical work.

The processing script just randomly generates some lines of characters every time you click. Below are some of my favourite outcomes.

Anders Hoff is a norwegian generative artist. He has some really interesting work that I’m probably going to try to copy over the next few months. He also writes about his work and his methods which is super-handy when you’re trying to ruthlessly chomp someone’s flavour. He also sells some of his mechanical plotter drawings, so definitely check that out if you’re interested in better versions of this.

1618f54a258 i1618f54a258

1618f557be7 i1618f557be7

1618f5499c5 i1618f5499c5

1618f5862df i1618f5862df (Look at me, accidentally inventing the letter A)