Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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

Maybe go for some special gfx library, that would draw lines with glow, etc. ?

Thank you for all the answers, it is like jumping into many years of experience in the field.

share|improve this question
3  
That is a very broad and ambiguous question. Can you share some example images? –  Byte56 Jul 13 '12 at 17:30
1  
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). –  Byte56 Jul 14 '12 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. –  GameCoder Jul 17 '12 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. –  Byte56 Jul 17 '12 at 13:10
1  
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. –  GameCoder Jul 17 '12 at 14:50
show 4 more comments

5 Answers 5

up vote 7 down vote accepted

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.

enter image description here enter image description here

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

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:

enter image description here

share|improve this answer
add comment

Maybe you're looking for something like the Fractal Flame Algorithm

share|improve this answer
1  
That is a pretty good guess. –  Byte56 Jul 13 '12 at 16:42
add comment

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.

share|improve this answer
    
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. :-) –  Steven Stadnicki Jul 17 '12 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. –  Anton Jul 17 '12 at 22:53
add comment

Perlin noise is something you should definitely check out: it's mostly a family of algorithms that produce pseudo-random patterns but with some additional "constant" properties.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.