3D‎ > ‎Structure Synth‎ > ‎

Other Structure Synth Example


  The script given below are Structure Synth example other than trees and simple fractal

  

Fractal Tree 1

//fractaltree1

#define gap 0.5

set maxdepth 200

set background white

set colorpool list: white , #f00 , #f80 , #ff0


 tree

rule tree md 6 {

   { x gap s 0.49 } tree

   { x gap y 0 s 0.49 rz 90  } tree

   { x gap y 0 s 0.49 rz -90 } tree

   { x gap y 0 s 0.49 ry -90 } tree

   { x gap y 0 s 0.49 ry 90  } tree

plus

}


rule plus {

   { x 0.25 s 0.25 1 1 rz 90 } d

}


rule d {

   { s 0.05 2 0.05 color random } box

}

Fractal Tree
  3D Tree
  Spiral Tree 3

Pythagoras tree 60 30 3D

//pytree 60 30 with consecutive 3d rotation on each level randomly

set maxdepth 15

R1

rule R1 md 1 > R1 {

{ y 0.842 x 0.5915 s 0.5 rz -60 h 10 }R1

{ y 1.092 x -0.3415 s 0.866 rz 30 h 10 }R1

square

}

rule R1 md 1 > R1{

{ y 0.842 z 0.5915 s 0.5 rx 60 h 10 }R1

{ y 1.092 z -0.3415 s 0.866 rx -30 h 10 }R1

square

}

rule square w 10 {

{ color #ffffff } box

}

rule square w 5 {

{ color #0000ff } box

}


3d Pythagoras Tree
  Pythagoras Tree Random Flip

Pythagoras Tree 70 20

//pytree 70 20 with flip on each level

set maxdepth 13

tree1

rule tree1 md 1 > tree2 {

{ y 0.719 x 0.6022 s 0.3420 rz -70 } tree1

{ y 1.102 x -0.2192 s 0.9397 rz 20 } tree1

square

}

rule tree2 md 1 > tree1 {

{ y 0.719 x -0.6022 s 0.3420 rz 70 } tree2

{ y 1.102 x 0.2192 s 0.9397 rz -20 } tree2

square

}

rule square w 2 {

{ color #ff0000 } box

}

rule square w 10 {

{ color #eeeeee } box

}


Pythagoras Tree 70

 Binary Tree

//Modified H Fractal,output is a 2d tree

#define displace 0.403

set colorpool list:white,#e80,#08e,#8e0,#80e

set maxdepth 20

set background #000


1 * {y -0.5 x 0.75 s 1.5 0.1 0.1 color random}box

1 * {s 1 1 0.3}tree

1 * { y -1 rz 180 s 1 1 0.3} tree2


rule tree maxdepth 8 {

{ y 0.465 x displace rz -90 s 0.707 0.707 1}tree

{ y 0.465 x -displace rz 90 s 0.707 0.707 1}branch

branch

}


rule tree2 maxdepth 5 {

{ y 0.465 x displace rz -90 s 0.707 0.707 1}tree2

{ y 0.465 x -displace rz 90 s 0.707 0.707 1}tree

tree

branch

}


rule branch{branch1}

rule branch{branch2}


rule branch1 maxdepth 7{

{ y 0.465 x displace rz -90 s 0.707 0.707 1}branch1

d

}


rule branch2 maxdepth 8{

{ y 0.465 x -displace rz 90 s 0.707 0.707 1}branch2

d

}


rule d{

{s 0.1 1 0.1 color random}box

}


H Tree