[Note: re-reading this before posting, I realized that this Q was a bit of an epic. Thank you for condoning my long explanation of the reasons for this persecution. I feel that if I were able to help other beginning similar projects, I would be more likely to board if I knew what the motivation was.]
I recently got into the Structure Synth of Michael Hviddfeldt Christensen. This is a tool for creating 3D geometry from (predominantly) context free Eisenscript grammar. The Synth structure itself is inspired by contextual art. Contextual free grammars can produce stunning results from surprisingly simple rule sets.
My current Structure Synth workflow includes exporting an OBJ file from Structure Synth, importing it into Blender, setting up lights, materials, etc., and then rendering with Luxrender. Unfortunately, importing these OBJ files often causes Blender to stop, as there may be thousands of objects with fairly complex geometry. I say honestly because Structure Synth only generates basic shapes, but the sphere represented by triangles still has many faces.
Thus, creating structures directly in Blender would be preferable to the current process (deep Blender support for Python scripts should make this possible). The Python Intelligent Library can use Blender's capabilities to create a single grid to create multiple objects, thereby saving memory. Plus Blender is a full-featured 3D package, and its ability to interpret CFDGs will provide creativity far beyond what Structure Synth can offer.
And so my question is how best to translate Eisenscript grammar into Python DSL. Here's what simple Eisenscript looks like:
set maxdepth 2000
{ a 0.9 hue 30 } R1
rule R1 {
{ x 1 rz 3 ry 5 } R1
{ s 1 1 0.1 sat 0.9 } box
}
rule R1 {
{ x 1 rz -3 ry 5 } R1
{ s 1 1 0.1 } box
}
, R1 ( 2) R1. R1 R1 ( ), . , 2000.
( CoffeeScript) - DSL Ruby . , - , .
Eisenscript Ruby DSL :
rule :r1 do
r1 :x => 1, :rz => 3, :ry => 5
box :s => [1, 1, 0.1], :sat => 0.9
end
rule :r1 do
r1 :x => 1, :rz => -3, :ry => 5
box :s => [1, 1, 0.1]
end
Python Python. , , DSL , , , - ?
Pythonista ?