r/functionalprogramming • u/inazuma_zero • Jun 17 '24
Question Generative art and functional programming languages
What were your experience with generative art domain in your favorite functional programming languages. I wonder if functional languages can simplify and make the process much more elegant
7
Upvotes
View all comments
Show parent comment
5
u/andrewcooke Jun 18 '24
http://conal.net/pan/
the image type is a function from pixel coordinate to colour. on top of that you can define composition of images, filters, etc. the final image is generated by evaluating the function at each pixel.
in contrast, with something like cairo, the image is mutable state.