Clojure2D is a library supporting generative coding or glitching. It's based on Java2D directly. It's Clojure only, no ClojureScript version.
Library contains plenty named colors, palettes and gradients.
There are various sources: colourlovers, thi.ng, paletteer, inigo quilez, cpt-city
200+ examples are in separate repository
This project is the answer to personal needs to optimize my own workflow for generative or glitch creations. I've been producing a lot of Processing code and started to suffer from limitations of working in 'write sketch and run' mode. Too much copy&paste between sketches, zillions of folders, zillions of processed images. And one day I fell in love with FP. This code is the answer.
... quil, thi.ng, clisk, possibly other?
No, rather no. The closest is quil, which is a really great library (both Clojure and Clojurescript, great documentation and webpage, functional mode, 3d support etc.).
Clojure2d emphasises math, color and pixel operations and adds a lot of ready to use effects/filters (see
It's kind of a personal library which supports my (probably not optimal, not convenient for others) way of creating stuff. There are still plenty of bugs and not idiomatic code. It may be slower than Processing. Eats a lot of memory (Pixels code is generally immutable).
Add the following line as a dependency to your
Since there are still no tutorials are available, see documentation. All namespaces are described below:
This is the main namespace with functions in four groups:
Pixels type as a representation of channel values of the image plus operations on pixels. Defines also:
This is the namespace for common generative/glitch specific libraries:
All math functions are in fastmath repository.
Yes! You can help with this project:
Discuss about it with me on Slack. Or just Pull Request.
Copyright © 2016-2023 GenerateMe Distributed under the MIT Licence
mixbox is provided under the CC BY-NC 4.0 license for non-commercial use only.
Can you improve this documentation? These fine people already did:
tsulej, GenerateMe, teesel, Caio Garcia & genmeblogEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries× close