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:
What feels like a million years and a lifetime ago, I wrote up a library for perlin and simple noise in Racket. Inspired by Jens Axel Søgaard’s new Sketching library (processing in Racket) and a conversation thereabout, I figure it’s about time to push noise to the
raco package manager!
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.
Quick post today. Let’s implement Tupper's self-referential formula in Racket!
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?
I have a gif collection now. :)
So what’s so interesting about that picture?
Today’s task comes from the Code Golf StackExchange. The idea behind code golf is to write a program with as few characters as possible, often rendering the code nigh on unreadable. Luckily, the same StackExchange also host popularity contests, one of which is the inspiration behind today’s post:
You are given two true color images, the Source and the Palette. They do not necessarily have the same dimensions but it is guaranteed that their areas are the same, i.e. they have the same number of pixels. Your task is to create an algorithm that makes the most accurate looking copy of the Source by only using the pixels in the Palette. Each pixel in the Palette must be used exactly once in a unique position in this copy. The copy must have the same dimensions as the Source. – American Gothic in the palette of Mona Lisa: Rearrange the pixels
Let’s talk about clocks.
We can draw traditional analog clocks1:
We can draw nice digital clocks:
┌─┐ │ │ ─┐ ┌─┐ │ │└─┤ │ │ │ └─┘ │ │ ─┴─└─┘
Or we can go downright mad and make clocks out of clocks: