Keywords: Context Free, Structure Synth, Blender, Quartz Composer, ASCII Art, Sunflow
ASCII Monster Tree: Our two areas of passion combine, Elisa working in nature, and myself working with FOSS. Here the code of the tree is revealed by creating a tree made of its own code. It's important to note that all of the software used to create this gallery was done with free and open source software. Revealing the code is one of the core concepts of FOSS, because without code sharing and reuse a programmers and artists job becomes much harder, and the knowledge is locked up. Here our project makes the code and imagery equally important by composing them together.
Code adapted by Elisa Ellis: http://acsweb.ucsd.edu/~enellis/index.html
Original tree code: Rorschach for Monsters
Ant head code: BUG !
startshape forest
rule forest {
tree { }
forest { z -1 s .7 y .7 x -1.5 b .1}
forest { z -1 s .7 y .7 x 1.5 b .1}
}
rule tree .7 {
JOINT {}
tree {y .999 s .996}
}
rule tree .005 {
RTETE{}
}
rule tree .05 // branch
{
tree {x -.3536 y -.3536 s .55 r 45}
tree{}
}
rule tree .05 // branch
{
tree {x .3536 y -.3536 s .5 r -45}
tree {}
}
rule tree 15 { tree {x .0087262 y -.0087262 s .998 r -1} }
rule tree .001 { CIRCLE {y -.5} }
rule tree .1 {
tree { flip 90 } }
rule tree .1 {
tree { r 10 }
tree { r -30 s .6} }
rule JOINT { SQUARE {} }
rule RTETE 2{RTETE {r 1}}
rule RTETE {TETE{}}
rule TETE 2{TETE{s .98}}
rule TETE {CIRCLE{s .9 1.2}ANT1{y .5 x -.2 s .2 }ANT1{y .5 x
.2 s .2 flip 90 }}
rule ANT1 {10*{y .1 s .99 r 1.2}CIRCLE{s .6}ANT2{y 1 x -.1 s
.8 r 30 }}
rule ANT1 {10*{y .1 s .99 r -1.2}CIRCLE{s .6}ANT2{y 1 x .1 s
.8 r 30 }}
rule ANT2 {ANT3{r 33}}
rule ANT2 {ANT3{r 30}}
rule ANT2 {ANT3{r 27}}
rule ANT3 {30*{y .1 s .98 r -.2}CIRCLE{s .6}ANT4{s .6 y 2.25
x .1}}
rule ANT3 {30*{y .1 s .98 r .2}CIRCLE{s .6}ANT4{s .6 y 2.25
x -.1}}
rule ANT4 {30*{y .1 s 1.01 r -.2}CIRCLE{s .6} ANT5{s 1.3 y
3.5 x .2 r 90}}
rule ANT4 {30*{y .1 s 1.01 r .2}CIRCLE{s .6} ANT5{s 1.3 y
3.5 x -.2 r 90}}
rule ANT5 {CIRCLE{s .6}ANT5{y .1 s .99 r .2}}
rule ANT5 .4{ANT5{s 1.01}}
rule ANT5 {ANT5{r .3}}
rule ANT5 {ANT5{r -.3}}
rule ANT5 .05{ANT6{}}
rule ANT6 {CIRCLE{s .6}ANT6{y .1 s .993}}
rule ANT6 .4{ANT6{s 1.01}}
rule ANT6 {ANT6{r .6}}
rule ANT6 {ANT6{r -.6}}
Alien head code: Strieber
startshape Rec
rule SEED {BRANCH {} }
rule SEED {BRANCH {rotate 3} }
rule SEED {BRANCH {rotate -18} }
rule SEED {BRANCH {rotate 2} }
rule SEED {BRANCH {rotate -10} }
rule SEED {FORK {}}
rule BRANCH {LEFTBRANCH {flip 90}}
rule BRANCH {LEFTBRANCH {}}
rule LEFTBRANCH 4 {BLOCK {} LEFTBRANCH {y 0.995 rotate 0.1
size 0.99 a .1}}
rule LEFTBRANCH 4 {BLOCK {} LEFTBRANCH {y 0.995 rotate 0.2
size 0.99 a .1}}
rule LEFTBRANCH {BLOCK {} LEFTBRANCH {y 0.995 rotate 4 size
0.99 a .1}}
rule LEFTBRANCH {BLOCK {} FORK {}}
rule BLOCK {treechoice {}}
rule FORK {BRANCH { } BRANCH {size 0.3 rotate 40}}
rule FORK {BRANCH { }BRANCH {size 0.5 rotate -40}}
rule FORK {BRANCH {size 0.5 rotate -30}BRANCH { }}
rule FORK {BRANCH {size 0.7 y 0.1 rotate 20}BRANCH {size 0.7
y 0.1 rotate -20}}
rule Rec {SEED{ }Rec { z -1000000 x 8 y 1.25 s .9 b .2 }Rec
{ z -1000000 x -5 y 1.2 s .6 b .2 } }
rule Rec {SEED{ }Rec { z -1000000 x -10 y 1.25 s .9 b
.2}Rec { z -1000000 x 12 y 1.1 s .7 b .2} }
rule Rec {Rec { y 1 } }
rule Rec .5 { }
//tree
rule treechoice{ tree {} }
rule treechoice { tree {flip 90}}
rule tree .7 // draw and continue
{
JOINT {}
tree {y .999 s .996}
}
rule tree .05 // branch
{
tree {x -.3536 y -.3536 s .55 r 45}
tree{}
}
rule tree .05 // branch
{
tree {x .3536 y -.3536 s .5 r -45}
tree {}
}
rule tree 15 { tree {x .0087262 y -.0087262 s .998 r -1} }
// random rotation
//rule tree .001 { CIRCLE {y -.5} }
rule tree .00003 {face{}}
//end it
rule JOINT { SQUARE {} }
rule face{
nose{x 6 y -4}
mouth{x 7 y -10}
eye{x 1 flip 90 r -10}
eye{x 15 y 0 r -20}
head{b .7}
}
rule head{
CIRCLE{s 35 x 10 y 0}
CIRCLE{s 55 x 12 y 15}
}
rule eye{
eye_path{}
}
path eye_path{
MOVETO{}
CURVETO{x 0 y 0 x1 0 y1 30 x2 30 y2 0}
CLOSEPOLY{}
STROKE{}
FILL{}
}
rule nose{
SQUARE{s .5 3}
SQUARE{s .5 3 x 1.5}
}
rule mouth{
CIRCLE{}
}
Worm code: Caterpiller
startshape Rec
rule SEED {BRANCH {} }
rule SEED {BRANCH {rotate 3} }
rule SEED {BRANCH {rotate -18} }
rule SEED {BRANCH {rotate 2} }
rule SEED {BRANCH {rotate -10} }
rule SEED {FORK {}}
rule BRANCH {LEFTBRANCH {flip 90}}
rule BRANCH {LEFTBRANCH {}}
rule LEFTBRANCH 4 {BLOCK {} LEFTBRANCH {y 0.995 rotate 0.1
size 0.99 a .1}}
rule LEFTBRANCH 4 {BLOCK {} LEFTBRANCH {y 0.995 rotate 0.2
size 0.99 a .1}}
rule LEFTBRANCH {BLOCK {} LEFTBRANCH {y 0.995 rotate 4 size
0.99 a .1}}
rule LEFTBRANCH {BLOCK {} FORK {}}
rule BLOCK {treechoice {}}
rule FORK {BRANCH { } BRANCH {size 0.3 rotate 40}}
rule FORK {BRANCH { }BRANCH {size 0.5 rotate -40}}
rule FORK {BRANCH {size 0.5 rotate -30}BRANCH { }}
rule FORK {BRANCH {size 0.7 y 0.1 rotate 20}BRANCH {size 0.7
y 0.1 rotate -20}}
rule Rec {SEED{ }Rec { z -1000000 x 8 y 1.25 s .9 b .2 }Rec
{ z -1000000 x -5 y 1.2 s .6 b .2 } }
rule Rec {SEED{ }Rec { z -1000000 x -10 y 1.25 s .9 b
.2}Rec { z -1000000 x 12 y 1.1 s .7 b .2} }
rule Rec {Rec { y 1 } }
rule Rec .5 { }
//tree
rule treechoice{ tree {} }
rule treechoice { tree {flip 90}}
rule tree .7 // draw and continue
{
JOINT {}
tree {y .999 s .996}
}
rule tree .05 // branch
{
tree {x -.3536 y -.3536 s .55 r 45}
tree{}
}
rule tree .05 // branch
{
tree {x .3536 y -.3536 s .5 r -45}
tree {}
}
rule tree 15 { tree {x .0087262 y -.0087262 s .998 r -1} }
// random rotation
//rule tree .001 { CIRCLE {y -.5} }
rule tree .3 { fear_worm {}}
//end it
rule JOINT { SQUARE {} }
rule fear_worm { fear_worm1 { } }
rule fear_worm { fear_worm2 { } }
rule fear_worm 0.1 {
antenna { s 0.01 y 0.02 }
antenna { s 0.01 r 20 y 0.02 }
}
rule fear_worm1 {
fear_circle { s 0.1 b 1}
fear_circle { s 0.1 b 1 r 10}
fear_worm1 { x 0.03 r 4.42 s 1.005}
}
rule fear_worm2 {
fear_circle { s 0.1 b 1}
fear_circle { s 0.1 b 1 r 10}
fear_worm2 { x 0.02 r -4.42 s 1.005}
}
rule fear_worm1 0.3 {
fear_worm { }
}
rule fear_worm2 0.3 {
fear_worm { }
}
rule fear_circle {
CIRCLE { }
fear_circle { x -0.005 y -0.005 s 0.98 0.998 b -0.001 }
}
rule fear_circle {
CIRCLE { }
fear_circle { x -0.005 y -0.000 s 0.97 0.998 b -0.05 }
}
rule antenna {
CIRCLE { }
antenna { x 1 r 10 s 0.8}
}
Code provided by Elisa Ellis: http://acsweb.ucsd.edu/~enellis/index.html
set maxobjects 320000
2 * { y 1 } 3 * { z 1 } 1 * {color #adff2f} dir
set background #FFF
//multiple definitions=randomness
rule dir {
{ x 1 ry 4 rx 4 s 0.95 b 0.901} dir
box
}
rule dir {
{ x 1 ry 4 rx -4 s 0.95 b 0.901} dir
box
}
rule dir {
{ x 1 ry -4 ry 4 s 0.95 b 0.901} dir
box
}
rule dir {
{ x 1 rz -8 ry 4 s 0.999 b 0.901 }dir
box
}
//somtimes there is nothing
rule dir w 0.001 {
}
rule dir {
{ x 1 rz 8 rx -2 s 0.999 b 0.901 } dir
box
//end
}
Download the blender project here: Blender.zip
The above image is composed of two of the Structure Synth tree's produced by Elisa E. I imported her tree using a python Structure Synth module for Blender available here. Then I arranged two tree's to make it seem continuous, and also adjusted the camera to get a tight shot. From there I used a "matrix" style code texture to help convey the internal code of the tree. I also experimented with Blender's different rendering styles, using ray-tracing to trace the volume of the tree along with its shadows.
The above spiral was created in Structure Synth using a very simple rectangle that varies in angle and height with each iteration. Exporting to Blender I played with the idea of Procedural Texture generation. Taking a mental step back, the object is generated using fractals, and procedural textures are also like fractals in that a mathematical function generates its color and shape, each time being unique.
I experimented with the coloring of this procedural texture. I was going for a "black and white" or binary color representation of this texture; thinking about the nature of binary information.
Now I added colors to accentuate the web like texture as it reminded me of a vine, much like that of the original monster tree that appeared as a vine growing out of a root.
Finally I settled on this texture for my spiral, a sort of "digital camo" much like the digital camouflage pattern used by the U.S. military for combat clothing. This binary, black and white, sharped edge between on and off colors I think best conveys the nature of digital information. This spiral was the early basis for my work getting to understand Blender's procedural texturing.