What am I looking at?
You are seeing every work of art, every idea, every thing, etched onto a single square.
However, it may be hard to make out all the details from your vantage. After all, to fit everything on a finite canvas you must paint with a very fine brush.
You could squint, but there's no need to strain your eyes. Simply zoom in to observe the smaller details of the canvas. Zoom in far enough and you might even find yourself.
The Universal Canvas...
- has a finite area, but is infinitely detailed.
- contains every image of every resolution.
- can be cut into any number of pieces, and each one will still contain every image of every resolution.
You may not believe me. After all, it's easy to make claims about pseudo-random patterns that 'make sense', but don't have any actual backing (see "every sequence of digits exists in pi").
But there's no need to trust me. I understand that this is hard to believe, that's why I added the image search feature. Just load any image and I will figure out where it is in the canvas and zoom in on it for you.
How is an 'image' defined?
The Universal Canvas is not made up of pixels. However, the canvas can be rendered to pixels. Every pixel in a rendering of the canvas corresponds to a specific square region of the canvas, and the pixel's color is the average color of the square region.
An image existing at a given resolution means that there is a region within the canvas, that, when rendered at said resolution, would produce the same pixels as the original image.
How am I running this on my computer?
So, I've gone on about how the Universal Canvas has infinite detail and contains infinite information, but at the end of the day there needs to be some way to simulate it without actually doing infinite computation and storing infinite data.
The core principle that the implementation of the canvas relies on is subdivision. The canvas is a square, which can be split into 4 squares, which can be split into 16 squares, etc. As we subdivide the canvas we refine the detail of the rendered colors. We start with a single solid color, then find the 4 colors that compose it, then find the colors that compose those colors, etc.
The key to making this technique work is the subdivision function, whose implementation hides the real magic behind the algorithm. But for now, we can just focus on using the function.
The subdivision function takes a color, state, and a square region, and outputs 4 colors and 4 states. The 'state' is just a blob of data that the subdivision function uses to store information it needs on successive subdivisions. The 'square region' is a region of the canvas that can be produced by recursively subdividing the full canvas into quadrants. The outputs of the function are the colors and states of the 4 quadrants composing the input square region.
The square region covering the whole canvas is given a hardcoded color and state to use as the first input for the subdivision function.
So, once you have this subdivision function, you can render any rectangular region of the canvas as follows:
- Create a set of square regions that contain a color and a state. The set should initially contain a single square region covering the entire canvas, whose color and state is hardcoded.
- Remove all regions from the set, subdivide them, and add the new subdivided regions to the set. Filter the set by removing all regions that don't overlap with the region you want to render.
- Let n be 5 or the number of pixels you wish to render, whichever is larger. If the set contains less than n regions, repeat the previous step.
- Render the square regions in the set to the screen, each one mapping to a square of solid color (pixel).
Further explanations coming soon