Reputation: 935
I came across this page a long time ago Steve A Baker And he mentions how one of the images on an earlier video game he created was done using a simple adder and math.
How do you do this kind of thing? It would be really cool to create images mathematically. I have wondered (and googled) but only found descriptions about fractals. But I don't think this is a fractal. Thanks.
Upvotes: 4
Views: 346
Reputation: 24892
Evolvotron and other similar evolutionary art programs basically do nothing but randomly manipulate mathematical expressions to generate images (OK user input plays a part too, which is where the "evolution" bit comes in). Karl Sim's pioneering paper is well worth a read.
Upvotes: 2
Reputation: 61066
Just a quick example
Suppose you have a 200x200 RGB image, and you define each color component as follows:
Red = Sin[i/200]
Green = Tan[j/300]
Blue = Sin[i j/300]
The result is:
Upvotes: 4
Reputation: 11395
Quite seriously, almost all of computer graphics is mathematical.
Your sample image could be done with a modulating function.
Trigonometry, linear algebra (matrices), vectors and calculus are all used in graphics.
Upvotes: 1
Reputation: 9724
Procedural image generation is well known in the demoscene community. You can refer to some of the open source demos for a variety of techniques.
Upvotes: 4
Reputation: 298582
Well, what do you mean by create images mathematically
? It's pretty vague, but in order to answer your question, I'll assume you mean create images using mathematical operations on a set of pre-defined data
.
That's pretty simple. Just make a pattern using a Python list or the alike:
pattern = ['o', 'o', 'o', 'o',
'o', 'o', 'o',
'o', 'o',
'o']
Then create a canvas-like thing to handle inserts and operations on it's contents (like changing colors, etc.).
I'm not sure how to answer, since you question is kind of vague...
Upvotes: 1