# How can I create beautiful, random, abstract images? [closed]

To generate random, beautiful, abstract images – which algorithms are not too complex and give good results?

• That is a very broad and ambiguous question. Can you share some example images?
– House
Jul 13, 2012 at 17:30
• I suppose it's an interesting experiment. Ask a broad vague question, then leave it alone and don't follow up for 9+ hours. Just let everyone guess at what you mean and see what comes out. Like seeing what grows on those leftovers in the back of the fridge. (Ah ha, that last bit might actually answer your question).
– House
Jul 14, 2012 at 1:07
• @Byte56, It is not like that, I asked the best question I could, and this is not the first one. The problem is quite broad itself.. Quality of the answers support my thesis. Jul 17, 2012 at 10:23
• You give yourself too much credit. The quality of these answers shows the quality of the community. The quality of this question is reflected in its score.
– House
Jul 17, 2012 at 13:10
• I disagree. Score of the question is result of social mechanisms, where group is likely to join attacking and excluding one of members. Number of favourites is one confirmation of this point of view. Jul 17, 2012 at 14:50

An approach I saw once was to generate a random mathematical function mapping x, y to a color. It was represented as a parse tree, built top-down, where each node was randomly chosen to be +, -, *, /, a trigonometric function, a constant color, or a variable (x or y); then any required subtree(s) were recursively generated. Then you evaluate the function for each pixel to get the image. It produced an interesting mix of structure (repeated elements, broken symmetries, etc.) and randomness.

Here are a couple examples. These use a slightly different algorithm than what I just described: they generate three separate random functions, one each for R, G, and B. Unfortunately the result tends to look like three independent images composited, which is why I suggested just using one random vector-valued function.

EDIT: I wrote up a slightly more detailed version of this answer as a blog post, including a Python implementation of the algorithm.

• Sounds pretty neat. Happen to have any examples of results?
– House
Jul 13, 2012 at 18:15
• @Byte56 Not on this computer; when I get home I can post a couple. Jul 13, 2012 at 19:01
• How did you draw the pixels? I am looking for a simple menthod to do off-screen drawing in mobile environment. Jul 17, 2012 at 10:45
• @GameCoder I just created an array to store the pixel values and looped over 'em to evaluate the function. Jul 17, 2012 at 16:27
• Might karlsims.com/papers/siggraph91.html be what you were thinking of? Jul 17, 2012 at 22:00

Using a cellular automata for simulation of a relaxion-diffusion equation might be right up your lines - the equations aren't really all that complex and the results are pretty striking. Have a look at http://www.cc.gatech.edu/~turk/reaction_diffusion/reaction_diffusion.html for some of the first papers on applying the results to computer graphics; http://www.sci.utah.edu/~allen/reaction-diffusion.html has some other fine examples, including for instance:

Comment gone answer, as per Nathan Reed's suggestion :)

Karl Sims did some work about 20 years ago producing (among other things) wonderful abstract images, see here for details. Scroll about halfway down to see some beautiful samples.

Basically a syntax tree is created, mapping X and Y coordinates to colors, and then genetic programming was applied using exhibition (IIRC) visitors for scoring.

In the actual implementation described, the syntax trees are expressed and evaluated using Lisp. Section 4.1 in the linked paper lists the available functions, which are about half normal mathematical functions and half image processing/generation functions such as blur or bw-noise.

• I remember that paper! His 3d structures (built by mutating surface parameters, IIRC) were even more astonishing. These days it seems like a lot of artists are using Processing for similar ideas. +1 just for someone else remembering all that early-90s SIGGRAPH work. :-) Jul 17, 2012 at 22:47
• @StevenStadnicki Well of course :D The old SIGGRAPH papers tend to be wonderful sources of material and inspiration for hobby projects, or just interesting in general. Jul 17, 2012 at 22:53