Mathematical artist is a program that generate random artistic pictures using mathematical expression taking x
and y
positions as input of an expression.
- x - x
- y - y
- sin(pi * expr) - s
- cos(pi * expr) - c
- avg(expr, expr) - a
- product(expr, expr) - X
The expression formed is represented by a traversal expression. Exemple
cos(pi(x * sin(pi y))) => xys*c
The expression will be randomly generated for each RGB color by given the maximum depth for each of them
./run.sh
Then follow instructions on the prompt
The PNM image can then be converted to PNG by using the following command
pnmtopng -phys [width] [height] 0 out.pnm > out.png
RGB depth: 5, dimension 1000x1000