A Clojure library for generating patterns, both at the small scale and the "layout" of smaller units. Units can be recursively nested. It was originally written to work with Quil, the Clojure wrapper around Processing, but has now been broken into several separate projects.
This repository, Patterning Core, contains code to generate patterns. But is no longer referencing or dependent on Quil / Processing at all. The generated patterns are merely data-structures. This library contains a function to render them as simple SVG. But it's likely you will want to write your own renderer for the pattern in the framework / environment you are working in.
Patterning Core is now in cljc, so it can be compiled to both Clojure and ClojureScript. And it can run in the browser.
A compiled version of this library is now available on Clojars. Include in your Lein project using :
(See below for an example of how to do this.)
An example of using Patterning in browser in a Figwheel project.
A separate project now shows how to use Patterning Core in a Quil / Processing project. See the example on that page.
Patterning for Processing
Patterning was originally written to be used in all-Clojure projects. But for those who are already more familiar with, or need to work in, Java and the Processing development environment itself, there's now a standard Processing Library wrapper around Patterning.
The source for that library and examples are on Patterning for Processing. They are based on the standard Processing Library template.
What Patterning looks like
See how we made this in the Functional Patterning Tutorial.
git clone https://github.com/interstar/Patterning-Core.git Patterning cd Patterning mkdir outs lein run
You should see that Patterning has produced several example patterns in the outs directory.
Check the src/clj/core.clj for code that made these patterns.
Copyright © 2014-2017 Phil Jones
Distributed under the Gnu Lesser General Public License either version 3.0 or (at your option) any later version.