Clojure2D.clojure2d

https://github.com/Clojure2D/clojure2d.git

git clone 'https://github.com/Clojure2D/clojure2d.git'

(ql:quickload :Clojure2D.clojure2d)
353

clojure2d Build Status Clojars Project

Clojure2D is a library supporting generative coding or glitching. It's based on Java2D directly. It's Clojure only, no ClojureScript version.

ex10 ex21 ex5

ex11 ex16 ex19

ex22 ex23

WARNING

Version 1.x.x is after big refactoring and contains plenty of breaking changes.

Documentation

Documentation with examples

Motivation

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.

Is it replacement for…

… quil, thi.ng, clisk, possibly other?

No, rather no. The closest is quil, which is really great library (both Clojure and Clojurescript, great documentation and webpage, functional mode, 3d support etc.). Clojure2d emphasises math, color and pixels operations and adds a lot of ready to use effects/filters (see extra namespaces`).

What's special in this library then?

In points:

What's odd?

It's kind of 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). Still not stable API and architecture.

Installation

Add following line as a dependency to your project.clj

Snapshot

[clojure2d "1.2.0-SNAPSHOT"]

Usage

Since still no tutorials are available, see documentation. All namespaces are described below:

clojure2d.core docs

This is main namespace with functions in three groups:

clojure2d.pixels docs

Pixels type as a representation of channel values of the image plus operations on pixels. Defines also:

clojure2d.color docs

clojure2d.extra

This is namespace for common generative/glitch specific libraries:

generateme/fastmath

All math functions are in fastmath repository.

Examples

200+ examples are in separate repository

EXAMPLES

Community

Clojurians

How to help

Yes! You can help with this project:

Discuss about it with me on Slack. Or just Pull Request.

Projects / links

License

Copyright © 2016-2018 GenerateMe Distributed under the MIT Licence