A 3D DSL in Clojure

(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at: lawrence@krubner.com

Very interesting, and a nice example of how much Clojure allows the creation of new languages:

My first step in the HOLO design process was the creation of a sufficiently flexible GP playground for my later experiments and to evolve path-finding agents to create a (typographic) form as an initial design idea. Related to this, though a year prior, I created the Mophogen DSL, partially done as a component of my commission for the Barbican / Google DevArt exhibition. Morphogen is a small domain-specific language, written in Clojure, for defining complex 3D forms starting from a single seed shape. Each operation acts on a single input shape and produces any number of result shapes (e.g. the “subdiv” operator splits a shape along an axis into 2 or more smaller shapes). If arranged in a tree structure, these operators recursively transform e.g. a box into highly complex objects. Most interesting to me was, how few operators would be actually needed to create interesting objects and the current implementation has only 8 built-in operators: split, reflect, inset corners, extrude, tilt, scale face, scale edge, delete.

Source