genea
look and say
quines
rat
robump
self-similar
song history
string synth
stroids
tm interpreter
Unless otherwise stated, all original content on this site is licensed under your choice of the GNU FDL or the Creative Commons ShareAlike License.
Hopefully, this website is valid. You can check the XHTML, the CSS, and the RSS.
This program makes self-similar images. I was originally inclined to call the images it makes ‘fractals’, but then someone gave me the actual definition of a fractal (a set with fractional dimension or something). I realized the images it makes aren’t quite like that.
As input to the program, you give a definition of the desired image's self-similarity. The image can ‘contain’ direct, flipped, scaled, or rotated copies of itself. You define a number of mappings from two vectors to three, where you give each of the three as a linear combination of the two. Here is one possibility:
In this case, the image contains two copies of itself: one that is rotated 45 degrees clockwise and scaled a bit, and one that is moved up the y axis and scaled more. To communicate this possibility to my program, you give it this on stdin:
| 2 | |
| 0 | 0 |
| .6 | -.6 |
| .6 | .6 |
| .8 | 0 |
| .4 | 0 |
| 0 | .4 |
This results in the following image:
The program was inspired by the visprint program written by Ian Goldberg, which was in turn based on an idea by Hal Finney. I thought the images produced by visprint were very appealing, so I wanted to mess with the code. Unfortunately, I could not seem to decipher the code, so I wrote my own program from scratch.
News Flash!
I just discovered that Pete
Keller (I know this guy due to the
Condor project and
the UPL) has made a
program similar to this that is vastly cooler! It makes images
that are essentially similar to the ones my program makes, but
it makes them in three dimensions using OpenGL and animates
them in real time!
Here
is his code.