Implement a simple virtual machine with two instructions: nop which does nothing for 1 cycles and addx $n which adds $n to the X register (initial value 1) in two cycles. Calculate the sum of cycle * X for the cycles 20, 60, 100, 140, 180, 220.

I recently came across a problem where I had a single image with a transparent background containing multiple images that I wanted to split into their component parts. For example, split this:

Perhaps the best known fractal of all: the Mandelbrot set.

Since I was already working on Python code that would render an image given a function (for a future post), I figured that I might as well render fractals with it.

That’s the result of graphing the above function at a point rather far away from the origin. Specifically, where y is around that crazy big number. Look familiar?