├── 3dframe1 ├── 3dframe1.es └── 3dframe1.jpg ├── AbstractShape ├── AbstractShape.es ├── AbstractShape.png ├── abstract1.es ├── abstract1.png ├── trunk4.es └── trunk4.png ├── Antenna ├── antenna.es └── antenna.png ├── BaravelleSpiral ├── baravellespiral.es └── baravellespiral2.es ├── BinaryTree ├── BinaryTree.es ├── BinaryTree2.es └── BinaryTree3.es ├── BinaryTree3d ├── BinaryTree3d.es └── BinaryTree3d.png ├── BoxFractal ├── Fratalcross.es ├── Fratalcross.png ├── boxfractal2d.es ├── boxfractal2d.png ├── boxfractal3d.es ├── boxfractal3d.png ├── fractalbox2.es ├── fractalbox2.png ├── fractalbox3.es ├── fractalbox3.png ├── fractalbox4.es ├── fractalbox4.png ├── sqsq2.es └── sqsq2.png ├── Chip ├── Chip2.es ├── Chip2.png ├── ChipBoard.es ├── ChipBoard.png ├── ChipBoard2.es ├── ChipBoard2.png ├── ChipNew2.es ├── ChipNew2.png ├── DIPchip.es └── DIPchip.png ├── Clock ├── Clock.es ├── Clock.png ├── SevenSegment.es └── SevenSegment.png ├── CubeRotation ├── CubeRotation1.es └── CubeRotation1.png ├── Dodecahedron ├── DodecaFractal.es ├── DodecaFractal.png ├── DodecaFractal2.es └── DodecaFractal2.png ├── DragonCurve ├── DragonCurve.es └── DragonCurve.png ├── FrameFractal ├── framefractal1.es ├── framefractal1.png ├── framefractal2.es ├── framefractal2.png ├── frameframe1.es ├── frameframe1.png ├── frameframe2.es └── frameframe2.png ├── LevyCCurve ├── LevyCCurve.es └── LevyCCurve.png ├── MengerSponge ├── MengerSponge.es ├── MengerSponge.png ├── newMenger3.es └── newMenger3.png ├── MiscStructures ├── Building1.es └── Building1.png ├── Mondrian ├── 3dmondrian1.es ├── 3dmondrian2.es ├── 3dmondrian3.es ├── 3dmondrian4.es ├── 3dmondrian5.es ├── 3dmondrian6.es ├── modmondrian.es ├── modmondrian.png ├── mondrian2.es ├── mondrian2.png ├── mondrian2d.es ├── mondrian2d.png ├── octahedron.es └── octahedron.png ├── NightCity ├── nightCity.es └── nightCity.png ├── Pythagoras ├── PythagorasTree.es ├── PythagorasTree.png ├── TestPytree1.es ├── TestPytree2.es ├── TestPytree3.es ├── TestPytree4.es ├── TestPytree5.es ├── TestPytree6.es ├── pyrandom.es ├── pyrandom.png ├── pytree2.es ├── pytree2.png ├── pytree3d.es ├── pytree3d.png ├── pytree3d4570flipped.es ├── pytree3d4570flipped.png ├── pytree3drandFlip.es ├── pytree3drandFlip.png ├── pytreeRandFlip.es ├── pytreeRandFlip.png ├── randomFramePytree.es └── randomFramePytree.png ├── README ├── RandomCube ├── 3drandcube.es ├── 3drandcube.png ├── 3drandcube3.es ├── 3drandcube3.png ├── 3drandstar2.es ├── 3drandstar2.png ├── 3drandstar3.es ├── 3drandstar3.png ├── randbox3d1.es ├── randbox3d1.png ├── randbox3d2.es ├── randbox3d2.png ├── randbox3d4.es └── randbox3d4.png ├── SierpinskiPyramid ├── SierpinskiPyramid.es ├── fractal4tri.es ├── fractal4tri.png ├── fractal5tri.es ├── fractal5tri.png ├── fractal6tri.es ├── fractal6tri.png ├── invertedsierpinkipyramid.es ├── invertedsierpinkipyramid.png ├── sierpinkipyramid.es ├── sierpinski1.es ├── sierpinskipyramidcube.es ├── sierpinskitetra.es ├── squaresq2.es └── squaresq2.png ├── SimpleStructures ├── Structure1.es ├── Structure1.png ├── Swastik.es ├── Swastik.png ├── forarm.es ├── forbunny.es ├── simple1.es ├── simple1.png ├── simple2.es ├── simple2.png ├── spiral1.es ├── spiral1.png ├── spiral2.es ├── spiral2.png ├── structure3.es ├── structure3.png ├── swirl.es ├── swirl.png ├── tile1.es ├── tile1.png ├── tile2.es └── tile2.png ├── Tree ├── 3dtree.es ├── 3dtree.png ├── 3dtree2.es ├── 3dtree2.png ├── 3dtree3.es ├── 3dtree3.png ├── Hfractal.es ├── Hfractal.png ├── Hfractal2.es ├── Hfractal2.png ├── Hfractal3d.es ├── Hfractal3d.png ├── flowertree.es ├── flowertree.png ├── fractaltree1.es ├── fractaltree1.png ├── fractaltree2.es ├── fractaltree2.png ├── h60tree.es ├── h60tree.png ├── spiraltree1.es ├── spiraltree1.png ├── spiraltree1modified.es ├── spiraltree1modified.png ├── spiraltree2.es ├── spiraltree2.png ├── spiraltree3.es ├── spiraltree3.png ├── spiraltree4.es ├── spiraltree4.png ├── tree10.es ├── tree10.png ├── tree11.es ├── tree11.png ├── tree6.es ├── tree6.png ├── tree7.es ├── tree7.png ├── tree8.es ├── tree8.png ├── tree8_2.es ├── tree8_2.png ├── tree9.es └── tree9.png ├── alhambra_full.es ├── alhambra_single.es ├── tictactoe.es └── tictactoe3d.es /3dframe1/3dframe1.es: -------------------------------------------------------------------------------- 1 | //3D Frame 2 | #define dis 0.55 3 | set colorpool list:white,#ee0,#e0e,#0ee 4 | set background #000 5 | 6 | a2 7 | 8 | rule a2 w 3 maxdepth 6 > d { 9 | 10 | { s 0.5 0.5 0.5 x dis y dis z dis } a2 11 | { s 0.5 0.5 0.5 x -dis y dis z dis } d 12 | { s 0.5 0.5 0.5 x dis y -dis z dis } d 13 | { s 0.5 0.5 0.5 x -dis y -dis z dis } d 14 | 15 | { s 0.5 0.5 0.5 x dis y dis z -dis } d 16 | { s 0.5 0.5 0.5 x -dis y dis z -dis } d 17 | { s 0.5 0.5 0.5 x dis y -dis z -dis } d 18 | { s 0.5 0.5 0.5 x -dis y -dis z -dis } a2 19 | 20 | } 21 | 22 | rule d w 2 { 23 | { s 1 1 1 color random } frame 24 | } 25 | 26 | rule frame { 27 | { s 0.1 1.1 0.1 x 5 z 5 } box 28 | { s 0.1 1.1 0.1 x 5 z -5 } box 29 | { s 0.1 1.1 0.1 x -5 z 5 } box 30 | { s 0.1 1.1 0.1 x -5 z -5 } box 31 | 32 | { s 1 0.1 0.1 y 5 z 5 } box 33 | { s 1 0.1 0.1 y 5 z -5 } box 34 | { s 1 0.1 0.1 y -5 z 5 } box 35 | { s 1 0.1 0.1 y -5 z -5 } box 36 | 37 | { s 0.1 0.1 1 y 5 x 5 } box 38 | { s 0.1 0.1 1 y 5 x -5 } box 39 | { s 0.1 0.1 1 y -5 x 5 } box 40 | { s 0.1 0.1 1 y -5 x -5 } box 41 | } 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /3dframe1/3dframe1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/3dframe1/3dframe1.jpg -------------------------------------------------------------------------------- /AbstractShape/AbstractShape.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | #define displace 0.5 3 | set maxdepth 12 4 | set background white 5 | 6 | R1 7 | 8 | rule R1 maxdepth 3 { 9 | { y 0.85 x 0 ry 45 s 0.707 h 40 } R1 10 | { x 0.85 x 0 rx 45 s 0.707 h 40 } R1 11 | { z 0.85 x 0 rz 45 s 0.707 h 40 } R1 12 | 13 | { y -0.85 x 0 ry 45 s 0.707 h 40 } R1 14 | { x -0.85 x 0 rx 45 s 0.707 h 40 } R1 15 | { z -0.85 x 0 rz 45 s 0.707 h 40 } R1 16 | 17 | box 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /AbstractShape/AbstractShape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/AbstractShape/AbstractShape.png -------------------------------------------------------------------------------- /AbstractShape/abstract1.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | 3 | #define skin #fd5 4 | #define leafc #df0 5 | #define basec #804000 6 | 7 | set maxdepth 100 8 | set background #888 9 | 10 | 10 * {x 2.5 ry 36}r1 11 | 1 * { x 0 z 5} 20 * {x 2.75 ry 18} r1 12 | 1 * { x 0 z 10} 30 * {x 2.75 ry 12}r1 13 | 14 | rule r1{ 15 | {ry 70}man 16 | } 17 | 18 | rule man { 19 | { s 1 y 1.65 color skin} sphere //head 20 | {y 1.2 s 0.25 color skin} box //neck 21 | {y 0.5 s 0.5 1.2 0.9 color random} box //chest 22 | {z -0.25 y -0.5 s 0.25 1.25 0.25 color skin} box //leg2 23 | {z 0.25 y -0.5 s 0.25 1.25 0.25 color skin} box //leg1 24 | {x 0.2 z -0.25 y -1.075 s 0.5 0.1 0.25 color skin} box //feet 25 | {x 0.2 z 0.25 y -1.075 s 0.5 0.1 0.25 color skin} box //feet 26 | 27 | {z 0.5 y 0.8 s 0.5 color random}sphere //arm1 28 | {z -0.5 y 0.8 s 0.5 color random}sphere //arm2 29 | 30 | {z 0.7 y 0.8 s 0.25 0.25 1.25 color skin} box //arm1 31 | {z -0.7 y 0.8 s 0.25 0.25 1.25 color skin} box //arm2 32 | } 33 | 34 | //tree 35 | 1 * {x 1.5 z -3.5 s 0.35} 4 * { y -1 color basec} box 36 | 1 * {x 1.5 z -3.5 s 0.35} 4 * { ry 90 color basec} spiral 37 | 38 | rule spiral w 100 md 50 > bunch{ 39 | box 40 | { y 0.5 s 0.995 color basec} spiral 41 | } 42 | 43 | rule spiral w 2 { 44 | { ry 180 rx 45 z 0.27 color basec} spiral 45 | } 46 | 47 | rule spiral w 1 { 48 | {x -0.25 rz 45 color basec} spiral 49 | } 50 | 51 | //ball 52 | 53 | rule bunch{ 54 | {s 15 color #4f4} sphere 55 | {s 15 }flowers 56 | } 57 | 58 | //tree 59 | rule flowers{ 60 | 61 | {rx -45 s 0.05 } ball1 62 | {rx -90 s 0.05 } ball1 63 | {rx -135 s 0.05 } ball1 64 | {rx 0 s 0.05 } ball1 65 | {rx 45 s 0.05 } ball1 66 | {rx 90 s 0.05 } ball1 67 | {rx 135 s 0.05 } ball1 68 | 69 | {rz -45 s 0.05 color #bb5} ball1 70 | {rz 45 s 0.05 color #bb5} ball1 71 | {rz 90 s 0.05 color #bb5} ball1 72 | {rz 135 s 0.05 color #bb5} ball1 73 | {rz -90 s 0.05 color #bb5} ball1 74 | {rz -135 s 0.05 color #bb5} ball1 75 | 76 | {ry -45 s 0.05 color #bb5} ball2 77 | {ry 45 s 0.05 color #bb5} ball2 78 | {ry -135 s 0.05 color #bb5} ball2 79 | {ry 135 s 0.05 color #bb5} ball2 80 | } 81 | 82 | rule ball1{ 83 | { s 1.5 y 7 color #fdd} sphere 84 | pettle 85 | } 86 | 87 | rule pettle{ 88 | 1 * {y 10.5 s 2.25 color leafc} 10 * { ry 36 } leaf1 89 | } 90 | 91 | rule leaf1{ 92 | { x 0.75 rz 25 s 1 0.05 0.5} box 93 | } 94 | 95 | rule ball2{ 96 | pettle2 97 | { s 1.5 z 7 color #fdd} sphere 98 | } 99 | 100 | rule pettle2{ 101 | 1 * {rx 90 y 10.5 s 2.25 color leafc} 10 * { ry 36 } leaf2 102 | } 103 | 104 | rule leaf2{ 105 | {x 0.75 rz 25 s 1 0.05 0.5} box 106 | } 107 | 108 | 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /AbstractShape/abstract1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/AbstractShape/abstract1.png -------------------------------------------------------------------------------- /AbstractShape/trunk4.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | #define shrink s 0.999 3 | 4 | set maxdepth 3000 5 | set background #888 6 | 7 | 2 * { ry 180 color #a6f } hbox 8 | 9 | 10 | rule hbox { r} 11 | //rule r { forwardx } 12 | //rule r { forwardy } 13 | //rule r { forwardz } 14 | rule r { turn } 15 | //rule r { turn2 } 16 | //rule r { turn4 } 17 | //rule r { turn3 } 18 | 19 | rule forwardx1 md 20 > turn4 { 20 | dbox 21 | { x 0.2 shrink } forwardx1 22 | } 23 | 24 | rule forwardx2 md 20 > turn3 { 25 | dbox 26 | { x 0.2 shrink } forwardx2 27 | } 28 | 29 | rule forwardx3 md 20 > turn2 { 30 | dbox 31 | { x 0.2 shrink } forwardx3 32 | } 33 | 34 | rule forwardx4 md 20 > turn { 35 | dbox 36 | { x 0.2 shrink } forwardx4 37 | } 38 | 39 | 40 | 41 | 42 | 43 | rule turn md 45 > forwardx1 { 44 | dbox 45 | { rz 2 x 0.1 shrink } turn 46 | } 47 | 48 | rule turn2 md 45 > forwardx2 { 49 | dbox 50 | { rz -2 x 0.1 shrink } turn2 51 | } 52 | 53 | rule turn3 md 45 > forwardx3 { 54 | dbox 55 | { ry 2 x 0.1 shrink } turn3 56 | } 57 | 58 | rule turn4 md 45 > forwardx4 { 59 | dbox 60 | { ry -2 x 0.1 shrink } turn4 61 | } 62 | 63 | 64 | rule dbox { 65 | {s 0.2 1 1 } box 66 | } 67 | 68 | -------------------------------------------------------------------------------- /AbstractShape/trunk4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/AbstractShape/trunk4.png -------------------------------------------------------------------------------- /Antenna/antenna.es: -------------------------------------------------------------------------------- 1 | //parabolic reflector 2 | set background #eee 3 | set maxdepth 7000 4 | 5 | 6 | 100 * {ry 3.6 s 1 1 1}R1 7 | 8 | rule R1 md 20{ 9 | {z 0.75 y 0 rx 1.5 s 1}R1 10 | d 11 | } 12 | 13 | rule d{ 14 | {s 1 0.1 1 color #aaa}box 15 | } 16 | 17 | //------------ 18 | 4 * {ry 90 s 1 1 1}R2 19 | 20 | rule R2 { 21 | 1 * {z 7 y -7.5 rx 55 s 1} 22 | e 23 | } 24 | 25 | rule e{ 26 | {s 0.25 17 0.25 color #eee}box 27 | } 28 | 29 | //------------ 30 | //subreflector 31 | 1 * {y -11.5} 20 * {ry 18 s 1 1 1}R3 32 | 1 * { y -12 s 0.25 1 0.25 color #eee}box 33 | 34 | rule R3 md 3{ 35 | { z 0.5 y 0 rx -8 s 1}R3 36 | d2 37 | } 38 | 39 | rule d2{ 40 | {s 0.5 0.025 0.5 color #00e}box 41 | } 42 | 43 | 44 | //-----------------base 45 | 4 * {ry 90 s 1 1 1}R4 46 | 47 | rule R4 { 48 | 1 * {z 7 y 2.05 rx -55 s 1} 49 | e2 50 | } 51 | 52 | rule e2{ 53 | {s 0.25 17 0.25 color #eee}box 54 | } 55 | 56 | R5 57 | 58 | rule R5 { 59 | 1 * {z 8 y 11 rx -30 s 2 2 20 color #e85} box 60 | 1 * {z 19.5 y 11 rx -30 s 1520 1520 0.1 color #886} box 61 | } 62 | 63 | -------------------------------------------------------------------------------- /Antenna/antenna.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Antenna/antenna.png -------------------------------------------------------------------------------- /BaravelleSpiral/baravellespiral.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | 3 | //1 * {y -0.7 s 50 0.1 50 color #eee}box 4 | 3 * {ry 90 h 90} spiral 5 | rule spiral md 2{ 6 | {x 0 z 0 y -0.3 ry 45 s 0.707 0.5 0.707 } spiral 7 | tri 8 | //square 9 | } 10 | 11 | rule square{ 12 | box 13 | } 14 | rule tri { 15 | triangle[0,0.1,0;0.5,0.1,0;0,0.1,0.5] 16 | triangle[0,-0.1,0;0.5,-0.1,0;0,-0.1,0.5] 17 | 18 | triangle[0,0.1,0;0,0.1,0.5;0,-0.1,0] 19 | triangle[0,-0.1,0.5;0,-0.1,0;0,0.1,0.5] 20 | 21 | triangle[0,0.1,0;0.5,0.1,0;0,-0.1,0] 22 | triangle[0.5,-0.1,0;0.5,0.1,0;0,-0.1,0] 23 | 24 | triangle[0,-0.1,0.5;0,0.1,0.5;0.5,0.1,0] 25 | triangle[0.5,0.1,0;0.5,-0.1,0;0,-0.1,0.5] 26 | 27 | } 28 | -------------------------------------------------------------------------------- /BaravelleSpiral/baravellespiral2.es: -------------------------------------------------------------------------------- 1 | set background #eee 2 | //1 * {y -0.25 s 50 0.1 50 color #eee}box 3 | 4 | spiral 5 | rule spiral md 7{ 6 | {x -0.03334 z 0.06 y -0.25 s 0.5 0.5 0.5 ry 60 } spiral 7 | sq 8 | } 9 | 10 | 11 | rule sq { 12 | 1 * {x 0 z 0 color #e49} tri 13 | 1 * {x 1 z 0 color #49e} tri 14 | 1 * {x 0.5 z 0.866 color #9e4} tri 15 | } 16 | 17 | rule square{ 18 | box 19 | 20 | } 21 | rule tri { 22 | triangle[-0.5,0.1,0;0.5,0.1,0;0,0.1,0.866] 23 | triangle[-0.5,-0.1,0;0.5,-0.1,0;0,-0.1,0.866] 24 | } 25 | -------------------------------------------------------------------------------- /BinaryTree/BinaryTree.es: -------------------------------------------------------------------------------- 1 | //H Fractal 2 | #define displace 0.403 3 | set colorpool list:white,#e80,#08e,#8e0 4 | //1 * {z -0.1 s 50 50 0.1 color #bbb}box 5 | set maxdepth 20 6 | set background #000 7 | 8 | //2 * {y -1 rz 180}tree 9 | 10 | 11 | tree 12 | 1 * { y -1 rz 180 } tree2 13 | 14 | rule tree maxdepth 7 { 15 | { y 0.465 x displace rz -90 s 0.707 0.707 1}branch 16 | { y 0.465 x -displace rz 90 s 0.707 0.707 1}tree 17 | branch 18 | } 19 | 20 | rule tree2 maxdepth 5 { 21 | { y 0.465 x displace rz -90 s 0.707 0.707 1}tree 22 | { y 0.465 x -displace rz 90 s 0.707 0.707 1}tree2 23 | tree 24 | } 25 | 26 | rule branch maxdepth 4 { 27 | { y 0.465 x -displace rz 90 s 0.707 0.707 1}branch 28 | d 29 | } 30 | 31 | rule d{ 32 | {s 0.1 1 0.1 color random}box 33 | } 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /BinaryTree/BinaryTree2.es: -------------------------------------------------------------------------------- 1 | //H Fractal 2 | #define displace 0.403 3 | set colorpool list:white,#e80,#08e,#8e0 4 | //1 * {z -0.1 s 50 50 0.1 color #bbb}box 5 | set maxdepth 20 6 | set background #000 7 | 8 | //2 * {y -1 rz 180}tree 9 | 10 | 11 | tree 12 | 1 * { y -1 rz 180 } tree2 13 | 14 | rule tree maxdepth 4 { 15 | { y 0.465 x displace rz -90 s 0.707 0.707 1}tree 16 | { y 0.465 x -displace rz 90 s 0.707 0.707 1}tree2 17 | branch 18 | } 19 | 20 | rule tree2 maxdepth 4 { 21 | { y 0.465 x displace rz -90 s 0.707 0.707 1}tree2 22 | { y 0.465 x -displace rz 90 s 0.707 0.707 1}tree 23 | tree 24 | } 25 | 26 | rule branch maxdepth 6 { 27 | { y 0.465 x -displace rz 90 s 0.707 0.707 1}branch 28 | d 29 | } 30 | 31 | rule d{ 32 | {s 0.1 1 0.1 color random}box 33 | } 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /BinaryTree/BinaryTree3.es: -------------------------------------------------------------------------------- 1 | //H Fractal 2 | #define displace 0.403 3 | set colorpool list:white,#e80,#08e,#8e0,#80e 4 | //1 * {z -0.1 s 50 50 0.1 color #bbb}box 5 | set maxdepth 20 6 | set background #000 7 | 8 | 9 | 1 * {y -0.5 x 0.75 s 1.5 0.1 0.1 color random}box 10 | 11 | 1 * {s 1 1 0.3}tree 12 | 1 * { y -1 rz 180 s 1 1 0.3} tree2 13 | 14 | rule tree maxdepth 8 { 15 | { y 0.465 x displace rz -90 s 0.707 0.707 1}tree 16 | { y 0.465 x -displace rz 90 s 0.707 0.707 1}branch 17 | 18 | branch 19 | 20 | // d 21 | } 22 | 23 | rule tree2 maxdepth 5 { 24 | { y 0.465 x displace rz -90 s 0.707 0.707 1}tree2 25 | { y 0.465 x -displace rz 90 s 0.707 0.707 1}tree 26 | tree 27 | branch 28 | } 29 | 30 | rule branch{ 31 | branch1 32 | } 33 | 34 | rule branch{ 35 | branch2 36 | } 37 | 38 | rule branch1 maxdepth 7{ 39 | { y 0.465 x displace rz -90 s 0.707 0.707 1}branch1 40 | d 41 | } 42 | 43 | rule branch2 maxdepth 8{ 44 | { y 0.465 x -displace rz 90 s 0.707 0.707 1}branch2 45 | d 46 | } 47 | 48 | rule d{ 49 | {s 0.1 1 0.1 color random}box 50 | } 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /BinaryTree3d/BinaryTree3d.es: -------------------------------------------------------------------------------- 1 | //H Fractal 2 | #define displace 0.403 3 | //set colorpool list:white,#f00,#f80,#ff0 4 | set colorpool list:white,#088,#00f,#08f 5 | //set colorpool list:white,#0ee,#ee0,#e0e 6 | //set maxdepth 20 7 | set background #000 8 | 9 | //uncomment to make a grey floor 10 | //1 * {y 0 x 1.5 s 0.1 155 155 color #ddd}box 11 | 12 | 2 * {y 3.5} 1 * {z 3.5}completeTree 13 | 14 | rule completeTree{ 15 | 1 * {y -0.5 x 0.75 s 1.5 0.15 0.15 color random}box 16 | 1 * {s 1 1 1 color random}tree 17 | 1 * { y -1 rz 180 s 1 1 1 color random} tree2 18 | } 19 | rule tree maxdepth 3 { 20 | { y 0.465 x displace rz -90 s 0.707 color random}tree 21 | { y 0.465 x -displace rz 90 s 0.707 color random}branch 22 | 23 | { y 0.465 z -displace rx -90 ry 90 s 0.707 color random}tree 24 | { y 0.465 z displace rx 90 ry 90 s 0.707 color random}branch 25 | branch 26 | 27 | // d 28 | } 29 | 30 | rule tree2 maxdepth 3 { 31 | { y 0.465 x displace rz -90 s 0.707 color random}tree2 32 | { y 0.465 x -displace rz 90 s 0.707 color random}tree 33 | 34 | { y 0.465 z -displace rx -90 ry 90 s 0.707 color random}tree 35 | { y 0.465 z displace rx 90 ry 90 s 0.707 color random}branch 36 | 37 | 38 | tree 39 | branch 40 | } 41 | 42 | rule branch{ 43 | branch1 44 | } 45 | 46 | rule branch{ 47 | branch2 48 | } 49 | 50 | rule branch1 maxdepth 6{ 51 | { y 0.465 x displace rz -90 s 0.707}branch1 52 | d 53 | } 54 | 55 | rule branch2 maxdepth 7{ 56 | { y 0.465 x -displace rz 90 s 0.707}branch2 57 | d 58 | } 59 | 60 | rule d{ 61 | {s 0.1 1 0.1}box 62 | } 63 | -------------------------------------------------------------------------------- /BinaryTree3d/BinaryTree3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/BinaryTree3d/BinaryTree3d.png -------------------------------------------------------------------------------- /BoxFractal/Fratalcross.es: -------------------------------------------------------------------------------- 1 | #define dis 1 2 | #define siz 1/3 3 | set colorpool list:white,#e00,#0e0,#00e 4 | set background #000 5 | 6 | a2 7 | 8 | rule a2 md 4 > d { 9 | 10 | { s siz x 0 y 0 z 0 h 15 } a2 11 | 12 | { s siz x dis y 0 z 0 } a2 13 | { s siz x -dis y 0 z 0 } a2 14 | { s siz x 0 y dis z 0 } a2 15 | { s siz x 0 y -dis z 0 } a2 16 | { s siz x 0 y 0 z dis } a2 17 | { s siz x 0 y 0 z -dis } a2 18 | 19 | } 20 | 21 | 22 | rule d { 23 | { color random } box 24 | } 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /BoxFractal/Fratalcross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/BoxFractal/Fratalcross.png -------------------------------------------------------------------------------- /BoxFractal/boxfractal2d.es: -------------------------------------------------------------------------------- 1 | #define dis 1 2 | #define siz 1/3 3 | set colorpool list:white,gray,#ddd,#999 4 | set background #000 5 | 6 | a2 7 | 8 | rule a2 w 3 maxdepth 2 > d { 9 | 10 | { s siz x 0 y 0 z 0 h 15 } a2 11 | 12 | { s siz x dis y dis z 0 h 15 } a2 13 | { s siz x dis y -dis z 0 h 15 } a2 14 | { s siz x -dis y dis z 0 h 15 } a2 15 | { s siz x -dis y -dis z 0 h 15 } a2 16 | 17 | } 18 | 19 | rule a2 w 3 maxdepth 3 > d { 20 | 21 | { s siz x 0 y 0 z 0 h 15 } a2 22 | 23 | { s siz x dis y dis z 0 h 15 } a2 24 | { s siz x dis y -dis z 0 h 15 } a2 25 | { s siz x -dis y dis z 0 h 15 } a2 26 | { s siz x -dis y -dis z 0 h 15 } a2 27 | 28 | } 29 | 30 | rule d { 31 | { color random } box 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /BoxFractal/boxfractal2d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/BoxFractal/boxfractal2d.png -------------------------------------------------------------------------------- /BoxFractal/boxfractal3d.es: -------------------------------------------------------------------------------- 1 | //Box Fractal 3D 2 | #define dis 1 3 | #define siz 1/3 4 | set colorpool list:white,skyblue,#0044dd,#0088ee 5 | set background #000 6 | 7 | a2 8 | 9 | rule a2 w 5 maxdepth 3 > d { 10 | 11 | { s siz x 0 y 0 z 0 h 15 } a2 12 | 13 | { s siz x dis y dis z dis h 15 } a2 14 | { s siz x dis y -dis z dis h 15 } a2 15 | { s siz x -dis y dis z dis h 15 } a2 16 | { s siz x -dis y -dis z dis h 15 } a2 17 | 18 | { s siz x dis y dis z -dis h 15 } a2 19 | { s siz x dis y -dis z -dis h 15 } a2 20 | { s siz x -dis y dis z -dis h 15 } a2 21 | { s siz x -dis y -dis z -dis h 15 } a2 22 | 23 | } 24 | 25 | 26 | rule d { 27 | { color random } box //::mymat 28 | } 29 | 30 | /*set raytracer::light [10,10,19] 31 | set raytracer::shadows false 32 | set raytracer::ambient-occlusion-samples 1 33 | set raytracer::samples 6 34 | //set raytracer::dof [0.23,0.07] 35 | //set raytracer::shiny::reflection 0.2 36 | set raytracer::mymat::phong [0.6,0.6,0.3]*/ 37 | -------------------------------------------------------------------------------- /BoxFractal/boxfractal3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/BoxFractal/boxfractal3d.png -------------------------------------------------------------------------------- /BoxFractal/fractalbox2.es: -------------------------------------------------------------------------------- 1 | //Fractal Box 2 2 | set colorpool list:white,white,blue,#ee0000,#00ee00 3 | set background #fff 4 | set maxObjects 100000 5 | set recursion 8 6 | #define size 0.5 7 | #define offset 0.5 8 | #define deep 3 9 | 10 | R1 11 | 12 | rule R1{ 13 | { z offset s size } front 14 | { y offset s size } up 15 | { x offset s size} right 16 | 17 | { z -offset s size } back 18 | { y -offset s size } down 19 | { x -offset s size } left 20 | 21 | { color random } box 22 | } 23 | 24 | rule up md deep{ 25 | {z offset s size } up 26 | {y offset s size } up 27 | {x offset s size} up 28 | 29 | {z -offset s size } up 30 | //{y -offset s size } up 31 | {x -offset s size } up 32 | 33 | {color random}box 34 | } 35 | 36 | rule down md deep{ 37 | {z offset s size } down 38 | //{y offset s size } down 39 | {x offset s size} down 40 | 41 | {z -offset s size } down 42 | {y -offset s size } down 43 | {x -offset s size } down 44 | 45 | {color random}box 46 | } 47 | 48 | rule right md deep{ 49 | {z offset s size } right 50 | {y offset s size } right 51 | {x offset s size} right 52 | 53 | {z -offset s size } right 54 | {y -offset s size } right 55 | //{x -offset s size } right 56 | 57 | {color random}box 58 | } 59 | 60 | rule left md deep{ 61 | {z offset s size }left 62 | {y offset s size } left 63 | //{x offset s size} left 64 | 65 | {z -offset s size } left 66 | {y -offset s size } left 67 | {x -offset s size } left 68 | 69 | {color random}box 70 | } 71 | 72 | rule front md deep{ 73 | {z offset s size }front 74 | {y offset s size } front 75 | {x offset s size} front 76 | 77 | //{z -offset s size } front 78 | {y -offset s size } front 79 | {x -offset s size } front 80 | 81 | {color random}box 82 | } 83 | 84 | rule back md deep{ 85 | //{z offset s size }back 86 | {y offset s size } back 87 | {x offset s size} back 88 | 89 | {z -offset s size } back 90 | {y -offset s size } back 91 | {x -offset s size } back 92 | 93 | {color random}box 94 | } -------------------------------------------------------------------------------- /BoxFractal/fractalbox2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/BoxFractal/fractalbox2.png -------------------------------------------------------------------------------- /BoxFractal/fractalbox3.es: -------------------------------------------------------------------------------- 1 | //Fractal Box 3 2 | set colorpool list:white,#ee0,#e0e,#0ee 3 | set background #fff 4 | #define size 0.4 5 | #define offset 0.5 6 | set maxdepth 7 7 | 8 | R1 9 | 10 | rule R1 md 4 { 11 | { x offset y offset z offset s size } R1 12 | { x offset y -offset z offset s size } R1 13 | { x -offset y -offset z offset s size } R1 14 | { x -offset y offset z offset s size } R1 15 | 16 | { x offset y offset z -offset s size } R1 17 | { x offset y -offset z -offset s size } R1 18 | { x -offset y -offset z -offset s size } R1 19 | { x -offset y offset z -offset s size } R1 20 | { color random } box 21 | } -------------------------------------------------------------------------------- /BoxFractal/fractalbox3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/BoxFractal/fractalbox3.png -------------------------------------------------------------------------------- /BoxFractal/fractalbox4.es: -------------------------------------------------------------------------------- 1 | //Fractal Box 2 2 | set colorpool list:white,white,blue,#ee0000,#00ee00 3 | set background #fff 4 | set maxObjects 100000 5 | set recursion 8 6 | #define size 0.5 7 | #define offset 0.825 8 | #define dist 0.275 9 | #define deep 5 10 | 11 | 1 * {x 0.95 y 0.95 z -0.575 s 3 3 0.05 color #ddd} box 12 | 1 * {x 0.95 y -0.575 z 0.95 s 3 0.05 3 color #ddd} box 13 | 1 * {x -0.575 y 0.95 z 0.95 s 0.05 3 3 color #ddd} box 14 | 15 | R1 16 | 17 | rule R1{ 18 | { x -dist y -dist z offset s size } front 19 | { x -dist y offset z -dist s size } up 20 | { x offset y -dist z -dist s size } right 21 | //{ x offset s size} right 22 | 23 | { color random } frame 24 | } 25 | 26 | rule up md deep{ 27 | { x -dist y offset z -dist s size } up 28 | { x -dist y -dist z offset s size } up 29 | { x offset y -dist z -dist s size } up 30 | 31 | { color random } frame 32 | } 33 | 34 | 35 | rule right md deep{ 36 | 37 | { x -dist y -dist z offset s size } right 38 | { x -dist y offset z -dist s size } right 39 | { x offset y -dist z -dist s size } right 40 | 41 | { color random } frame 42 | } 43 | 44 | 45 | rule front md deep{ 46 | { x -dist y -dist z offset s size } front 47 | { x -dist y offset z -dist s size } front 48 | { x offset y -dist z -dist s size } front 49 | 50 | { color random } frame 51 | } 52 | 53 | rule frame { 54 | { s 0.1 1.1 0.1 x 5 z 5 } box 55 | { s 0.1 1.1 0.1 x 5 z -5 } box 56 | { s 0.1 1.1 0.1 x -5 z 5 } box 57 | { s 0.1 1.1 0.1 x -5 z -5 } box 58 | 59 | { s 1 0.1 0.1 y 5 z 5 } box 60 | { s 1 0.1 0.1 y 5 z -5 } box 61 | { s 1 0.1 0.1 y -5 z 5 } box 62 | { s 1 0.1 0.1 y -5 z -5 } box 63 | 64 | { s 0.1 0.1 1 y 5 x 5 } box 65 | { s 0.1 0.1 1 y 5 x -5 } box 66 | { s 0.1 0.1 1 y -5 x 5 } box 67 | { s 0.1 0.1 1 y -5 x -5 } box 68 | } -------------------------------------------------------------------------------- /BoxFractal/fractalbox4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/BoxFractal/fractalbox4.png -------------------------------------------------------------------------------- /BoxFractal/sqsq2.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | // Write EisenScript code here... 3 | set colorpool list:red,blue,green,white,white 4 | set background #fff 5 | #define size 0.33 6 | #define offset 0.6 7 | set maxdepth 7 8 | //1 *{x 0 y -0.5 s 50 0.1 50 color #eee}box 9 | R1 10 | 11 | rule R1 md 4{ 12 | {z offset s size } R1 13 | {y offset s size } R1 14 | {x offset s size} R1 15 | 16 | {z -offset s size } R1 17 | {y -offset s size } R1 18 | {x -offset s size } R1 19 | 20 | {color random }box 21 | } 22 | 23 | 24 | set raytracer::shadows false 25 | 26 | // the number of samples controls the quality 27 | // '6' means 6x6 samples per pixels, and is the default. 28 | set raytracer::samples 16 29 | 30 | // dof is depth-of-field. 31 | // Use 'Edit | Show 3D Object Information' to find the correct plane 32 | // comment the line below to disable this. 33 | set raytracer::dof [0.2728,0.05] 34 | 35 | // Set materials either globally, 36 | // or for a selected tag (e.g. 'shiny') 37 | set raytracer::ambient-occlusion-samples 1 38 | //set raytracer::shiny::reflection 0.3 39 | //set raytracer::phong [0.5,0.6,0.2] -------------------------------------------------------------------------------- /BoxFractal/sqsq2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/BoxFractal/sqsq2.png -------------------------------------------------------------------------------- /Chip/Chip2.es: -------------------------------------------------------------------------------- 1 | // chip 2 | set background #fff 3 | 4 | 1 * {z -0.085 s 10 10 0.025 color #bbb} box 5 | 6 | 1 * {z -0.015 s 1.3 1.3 0.025 color #777} box 7 | 1 * {z -0.025 s 3 3 0.025 color #235} box 8 | 9 | //inner connecting wires 10 | 1 * {x -0.525 y 0.5 } 20 * { x 0.05 color #eee} inpins 11 | 1 * {y -0.525 x 0.5 rz 90} 20 * {x 0.05 color #eee} inpins 12 | 1 * {y -0.525 x -0.5 rz 90} 20 * { x 0.05 color #eee} inpins 13 | 1 * {x -0.525 y -0.5} 20 * { x 0.05 color #eee} inpins 14 | 15 | rule inpins{ 16 | {s 0.005 0.35 0.005} box 17 | } 18 | 19 | 20 | 1 * {x 0 y 1.075 } cover 21 | 1 * {x 1.075 y 0 rz 90} cover 22 | 1 * {x 0 y -1.075 } cover 23 | 1 * {x -1.075 y 0 rz 90} cover 24 | 25 | rule cover{ 26 | {s 3 0.85 0.025 color #235} box 27 | } 28 | 29 | //outer pins 30 | 1 * { x -1.565 y 1.5 z -0.015} 20 * { x 0.15 color #eee} opins 31 | 1 * { x -1.5 y -1.565 z -0.015 rz 90} 20 * { x 0.15 color #eee} opins 32 | 1 * { x 1.565 y -1.5 z -0.015 rz 180} 20 * { x 0.15 color #eee} opins 33 | 1 * { x 1.5 y 1.565 z -0.015 rz 270} 20 * { x 0.15 color #eee} opins 34 | 35 | rule opins{ 36 | {s 0.05 0.1 0.01} box 37 | {y 0.045 z -0.015 rx 90 s 0.05 0.02 0.01}box 38 | {y 0.045 z -0.045 ry 90 s 0.05 0.01 0.01}box 39 | } 40 | 41 | 42 | 43 | 44 | //core 45 | 46 | a2 47 | 48 | rule a2 w 1 maxdepth 2 > d { 49 | { s 0.3334 1 1 x -1 h 5} a2 50 | { s 0.6666 1 1 x 0.25 h 25} a2 51 | } 52 | 53 | 54 | rule a2 w 10 maxdepth 4 > d { 55 | { s 0.5 1 1.09 x -0.5 h 25} a2 56 | { s 0.5 1 1.05 x 0.5 h 35} a2 57 | } 58 | 59 | 60 | rule a2 w 8 maxdepth 5 > d { 61 | { s 1 0.5 1.075 y -0.5 h 5 } a2 62 | { s 1 0.5 1.065 y 0.5 h 35} a2 63 | } 64 | 65 | rule a2 w 0 maxdepth 2 > d { 66 | { s 1 0.3334 1 y -1 h 15} a2 67 | { s 1 0.6666 1 y 0.25 h 5} a2 68 | } 69 | 70 | rule d { 71 | { s 1 1 0.02 } box 72 | } 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /Chip/Chip2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Chip/Chip2.png -------------------------------------------------------------------------------- /Chip/ChipBoard.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | // chip 3 | set background #fff 4 | #define off 0.85 5 | 1 * {z -0.085 s 4 4 0.025 color #888} box 6 | 7 | board 8 | 9 | rule board w 1 md 1 > chip{ 10 | {x off y off s 0.5 0.5 1 } board 11 | {x -off y -off s 0.5 0.5 1 } board 12 | {x off y -off s 0.5 0.5 1 } board 13 | {x -off y off s 0.5 0.5 1 } board 14 | } 15 | 16 | rule board w 1 md 1 > chip{ 17 | {x off y off s 0.5 0.5 1 } board 18 | {x -off y -off s 0.5 0.5 1 } board 19 | {x off y -off s 0.5 0.5 1 } board 20 | {x -off y off s 0.5 0.5 1 } board 21 | } 22 | 23 | 24 | 25 | rule chip{ 26 | 1 * {z -0.015 s 1.3 1.3 0.025 color #777} box 27 | 1 * {z -0.025 s 3 3 0.025 color #235} box 28 | 29 | //inner connecting wires 30 | 1 * {x -0.525 y 0.5 } 20 * { x 0.05 color #eee} inpins 31 | 1 * {y -0.525 x 0.5 rz 90} 20 * {x 0.05 color #eee} inpins 32 | 1 * {y -0.525 x -0.5 rz 90} 20 * { x 0.05 color #eee} inpins 33 | 1 * {x -0.525 y -0.5} 20 * { x 0.05 color #eee} inpins 34 | 35 | 1 * {x 0 y 1.075 } cover 36 | 1 * {x 1.075 y 0 rz 90} cover 37 | 1 * {x 0 y -1.075 } cover 38 | 1 * {x -1.075 y 0 rz 90} cover 39 | 40 | //outer pins 41 | 1 * { x -1.565 y 1.5 z -0.015} 20 * { x 0.15 color #eee} opins 42 | 1 * { x -1.5 y -1.565 z -0.015 rz 90} 20 * { x 0.15 color #eee} opins 43 | 1 * { x 1.565 y -1.5 z -0.015 rz 180} 20 * { x 0.15 color #eee} opins 44 | 1 * { x 1.5 y 1.565 z -0.015 rz 270} 20 * { x 0.15 color #eee} opins 45 | 46 | //core 47 | a2 48 | } 49 | 50 | 51 | rule inpins{ 52 | {s 0.005 0.35 0.005} box 53 | } 54 | 55 | 56 | 57 | rule cover{ 58 | {s 3 0.85 0.025 color #235} box 59 | } 60 | 61 | 62 | rule opins{ 63 | {s 0.05 0.1 0.01} box 64 | {y 0.045 z -0.015 rx 90 s 0.05 0.02 0.01}box 65 | {y 0.045 z -0.045 ry 90 s 0.05 0.01 0.01}box 66 | } 67 | 68 | 69 | rule a2 w 1 maxdepth 2 > d { 70 | { s 0.3334 1 1 x -1 h 5} a2 71 | { s 0.6666 1 1 x 0.25 h 25} a2 72 | } 73 | 74 | 75 | rule a2 w 10 maxdepth 4 > d { 76 | { s 0.5 1 1.09 x -0.5 h 25} a2 77 | { s 0.5 1 1.05 x 0.5 h 35} a2 78 | } 79 | 80 | 81 | rule a2 w 8 maxdepth 5 > d { 82 | { s 1 0.5 1.075 y -0.5 h 5 } a2 83 | { s 1 0.5 1.065 y 0.5 h 35} a2 84 | } 85 | 86 | rule a2 w 0 maxdepth 2 > d { 87 | { s 1 0.3334 1 y -1 h 15} a2 88 | { s 1 0.6666 1 y 0.25 h 5} a2 89 | } 90 | 91 | rule d { 92 | { s 1 1 0.02 } box 93 | } 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /Chip/ChipBoard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Chip/ChipBoard.png -------------------------------------------------------------------------------- /Chip/ChipBoard2.es: -------------------------------------------------------------------------------- 1 | //chip board 2 2 | set background #fff 3 | #define off 0.9 4 | #define dis 0.9 5 | //green base 6 | 1 * {z -0.085 s 4 4 0.025 color #999} box 7 | 8 | board 9 | 10 | rule board w 1 md 1 > flatchip{ 11 | {x off y off s 0.5 0.5 1 } board 12 | {x -off y -off s 0.5 0.5 1 } board 13 | {x off y -off s 0.5 0.5 1 } board 14 | {x -off y off s 0.5 0.5 1 } board 15 | } 16 | 17 | rule board w 1 md 1 > r2{ 18 | {x dis y off s 0.5 0.5 1 } board 19 | {x -dis y -off s 0.5 0.5 1 } board 20 | {x dis y -off s 0.5 0.5 1 } board 21 | {x -dis y off s 0.5 0.5 1 } board 22 | } 23 | 24 | rule r2{ 25 | {x 0 y -1 s 0.5 }dipchip 26 | {x 0 y 0.0 s 0.5 }dipchip 27 | {x 0 y 1 s 0.5 }dipchip 28 | } 29 | 30 | rule dipchip{ 31 | 1 * {z -0.01 s 6 1.5 0.025 color #235} box 32 | 1 * {z -0.025 s 6 1.5 0.025 color #235} box 33 | 34 | //outer pins 35 | 1 * { x -3.075 y 0.75 z -0.015} 40 * { x 0.15 color #eee} opins 36 | 1 * { x 3.075 y -0.75 z -0.015 rz 180} 40 * { x 0.15 color #eee} opins 37 | } 38 | 39 | //flat pack chip 40 | //flatchip 41 | 42 | 43 | rule flatchip{ 44 | 1 * {z -0.01 s 3 3 0.025 color #235} box 45 | 1 * {z -0.025 s 3 3 0.025 color #235} box 46 | 47 | //outer pins 48 | 1 * { x -1.565 y 1.5 z -0.015} 20 * { x 0.15 color #eee} opins 49 | 1 * { x -1.5 y -1.565 z -0.015 rz 90} 20 * { x 0.15 color #eee} opins 50 | 1 * { x 1.565 y -1.5 z -0.015 rz 180} 20 * { x 0.15 color #eee} opins 51 | 1 * { x 1.5 y 1.565 z -0.015 rz 270} 20 * { x 0.15 color #eee} opins 52 | } 53 | 54 | rule opins{ 55 | {s 0.05 0.1 0.01} box 56 | {y 0.045 z -0.015 rx 90 s 0.05 0.02 0.01}box 57 | {y 0.045 z -0.045 ry 90 s 0.05 0.01 0.01}box 58 | } 59 | 60 | -------------------------------------------------------------------------------- /Chip/ChipBoard2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Chip/ChipBoard2.png -------------------------------------------------------------------------------- /Chip/ChipNew2.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here...12 2 | set background #fff 3 | a2 4 | 5 | rule a2 w 3 maxdepth 3 > d { 6 | 7 | { s 0.5 0.5 0.5 x 0.5 y 0.5 h 45} a2 8 | { s 0.5 0.5 0.5 x -0.5 y 0.5 h 10} a2 9 | { s 0.5 0.5 0.5 x 0.5 y -0.5 h 60} a2 10 | { s 0.5 0.5 0.5 x -0.5 y -0.5 h 30} a2 11 | 12 | } 13 | 14 | rule a2 w 3 maxdepth 3 > d { 15 | 16 | { s 0.5 0.5 0.5 x 0.5 y 0.5 h 5} a2 17 | { s 0.5 0.5 0.5 x -0.5 y 0.5 h 15} a2 18 | { s 0.5 0.5 0.5 x 0.5 y -0.5 h 45} a2 19 | { s 0.5 0.5 0.5 x -0.5 y -0.5 h 45} a2 20 | 21 | } 22 | 23 | rule a2 w 1 maxdepth 1 > d { 24 | 25 | { s 0.5 1 0.5 x 0.5 y 0 h 5} a2 26 | { s 0.5 1 0.5 x -0.5 y 0 h 15} a2 27 | 28 | } 29 | 30 | rule a2 w 1 maxdepth 1 > d { 31 | 32 | { s 1 0.5 0.5 x 0 y 0.5 h 5} a2 33 | { s 1 0.5 0.5 x 0 y -0.5 h 15} a2 34 | 35 | } 36 | 37 | 38 | 39 | 40 | rule d w 2 { 41 | {s 1 1 0.25} box 42 | } -------------------------------------------------------------------------------- /Chip/ChipNew2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Chip/ChipNew2.png -------------------------------------------------------------------------------- /Chip/DIPchip.es: -------------------------------------------------------------------------------- 1 | //dip chip 2 | set colorpool list:white,gray,#444,#888,#ddd 3 | set background #fff 4 | #define off 0.5 5 | #define dis 1.65 6 | //green base 7 | 1 * {z -0.085 s 10 10 0.025 color #bbb} box 8 | 9 | chip 10 | //board 11 | 12 | rule board w 1 md 1 > chip{ 13 | {x dis y off s 0.5 0.5 1 } board 14 | {x -dis y -off s 0.5 0.5 1 } board 15 | {x dis y -off s 0.5 0.5 1 } board 16 | {x -dis y off s 0.5 0.5 1 } board 17 | } 18 | 19 | rule board w 1 md 1 > chip{ 20 | {x dis y off s 0.5 0.5 1 } board 21 | {x -dis y -off s 0.5 0.5 1 } board 22 | {x dis y -off s 0.5 0.5 1 } board 23 | {x -dis y off s 0.5 0.5 1 } board 24 | } 25 | 26 | rule chip{ 27 | 28 | 1 * {z -0.015 s 1.3 1.3 0.025 color #777} box 29 | 1 * {z -0.025 s 6 1.5 0.025 color #235} box 30 | 31 | //inner connecting wires 32 | 1 * {x -0.26 y 0.35 } 20 * { x 0.025 color #eee} inpins 33 | 1 * {y -0.26 x 0.35 rz 90} 20 * {x 0.025 color #eee} inpins 34 | 1 * {y -0.26 x -0.35 rz 90} 20 * { x 0.025 color #eee} inpins 35 | 1 * {x -0.26 y -0.35} 20 * { x 0.025 color #eee} inpins 36 | 37 | //cover 38 | 1 * {x 0 y 0.575 } cover1 39 | 1 * {x 0 y -0.575 } cover1 40 | 41 | 1 * {x 1.75 y 0 rz 90} cover2 42 | 1 * {x -1.75 y 0 rz 90} cover2 43 | 44 | //outer pins 45 | 1 * { x -3.075 y 0.75 z -0.015} 40 * { x 0.15 color #eee} opins 46 | //1 * { x -1.5 y -1.565 z -0.015 rz 90} 20 * { x 0.15 color #eee} opins 47 | 1 * { x 3.075 y -0.75 z -0.015 rz 180} 40 * { x 0.15 color #eee} opins 48 | //1 * { x 1.5 y 1.565 z -0.015 rz 270} 20 * { x 0.15 color #eee} opins 49 | 50 | //core 51 | {s 0.5}a2 52 | } 53 | 54 | rule inpins{ 55 | {s 0.005 0.35 0.005} box 56 | } 57 | 58 | rule cover1{ 59 | {s 6 0.35 0.025 color #235} box 60 | } 61 | 62 | rule cover2{ 63 | {s 1 2.5 0.025 color #235} box 64 | } 65 | 66 | rule opins{ 67 | {s 0.05 0.1 0.01} box 68 | {y 0.045 z -0.015 rx 90 s 0.05 0.02 0.01}box 69 | {y 0.045 z -0.045 ry 90 s 0.05 0.01 0.01}box 70 | } 71 | 72 | 73 | 74 | rule a2 w 1 maxdepth 2 > d { 75 | { s 0.3334 1 1 x -1 h 5} a2 76 | { s 0.6666 1 1 x 0.25 h 25} a2 77 | } 78 | 79 | 80 | rule a2 w 10 maxdepth 4 > d { 81 | { s 0.5 1 1.09 x -0.5 h 25} a2 82 | { s 0.5 1 1.05 x 0.5 h 35} a2 83 | } 84 | 85 | 86 | rule a2 w 8 maxdepth 5 > d { 87 | { s 1 0.5 1.075 y -0.5 h 5 } a2 88 | { s 1 0.5 1.065 y 0.5 h 35} a2 89 | } 90 | 91 | rule a2 w 0 maxdepth 2 > d { 92 | { s 1 0.3334 1 y -1 h 15} a2 93 | { s 1 0.6666 1 y 0.25 h 5} a2 94 | } 95 | 96 | rule d { 97 | { s 1 1 0.02 } box 98 | } 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /Chip/DIPchip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Chip/DIPchip.png -------------------------------------------------------------------------------- /Clock/Clock.es: -------------------------------------------------------------------------------- 1 | //Seven Segment 2 | #define dist 1.6 3 | #define gap 4.75 4 | #define big 1 5 | 6 | { x 20 y -11.25 z -2.5 s 500 1 500 color #04e} box 7 | clock 8 | 9 | 10 | rule clock{ 11 | { x 20 y -3.25 z -2.5 color #eee } frame 12 | {color #229}display 13 | } 14 | 15 | rule frame{ 16 | { s 40 15 5 } box 17 | { y 6.5 z 3 s 40 2 1 } box 18 | { y -6.5 z 3 s 40 2 1 } box 19 | { x -19 z 3 s 2 15 1 } box 20 | { x 19 z 3 s 2 15 1 } box 21 | } 22 | 23 | 24 | rule display { 25 | 1 * { s big} 1 * { x 5 } digit1 26 | 1 * { s big} 1 * { x 10 } digit2 27 | 1 * { s big} 1 * { x 17 } digit0 28 | 1 * { s big} 1 * { x 22 } digit0 29 | 1 * { s big} 1 * { x 29 } digit0 30 | 1 * { s big} 1 * { x 35 } digit1 31 | 32 | 1 * { s big} 1 * { x 13.5 color #850} separate 33 | 1 * { s big} 1 * { x 25.5 color #850 } separate 34 | 35 | } 36 | 37 | rule separate{ 38 | { x 0 y -1.75 s 0.5 1.5 0.2 } box 39 | { x 0 y -4.75 s 0.5 1.5 0.2 } box 40 | } 41 | 42 | rule digi { digit0 } 43 | rule digi { digit1 } 44 | rule digi { digit2 } 45 | rule digi { digit3 } 46 | rule digi { digit4 } 47 | rule digi { digit5 } 48 | rule digi { digit6 } 49 | rule digi { digit7 } 50 | rule digi { digit8 } 51 | rule digi { digit9 } 52 | 53 | 54 | rule digit9 { 55 | segment 56 | { x dist y -dist rz 90 } segment 57 | { x -dist y -dist rz 90 } segment 58 | { x dist y -gap rz 90 } segment 59 | { y -3.16 } segment 60 | { y -6.35 } segment 61 | } 62 | 63 | rule digit8 { 64 | segment 65 | { x dist y -dist rz 90 } segment 66 | { x -dist y -dist rz 90 } segment 67 | { x dist y -gap rz 90 } segment 68 | { x -dist y -gap rz 90 } segment 69 | { y -3.16 } segment 70 | { y -6.35 } segment 71 | } 72 | 73 | rule digit7 { 74 | segment 75 | { x dist y -dist rz 90 } segment 76 | { x dist y -gap rz 90 } segment 77 | } 78 | 79 | rule digit6 { 80 | segment 81 | { x -dist y -dist rz 90 } segment 82 | { x dist y -gap rz 90 } segment 83 | { x -dist y -gap rz 90 } segment 84 | { y -3.16 } segment 85 | { y -6.35 } segment 86 | } 87 | 88 | rule digit5 { 89 | segment 90 | { x -dist y -dist rz 90 } segment 91 | { x dist y -gap rz 90 } segment 92 | { y -3.16 } segment 93 | { y -6.35 } segment 94 | } 95 | 96 | rule digit4 { 97 | { x dist y -dist rz 90 } segment 98 | { x -dist y -dist rz 90 } segment 99 | { x dist y -gap rz 90 } segment 100 | { y -3.16 } segment 101 | } 102 | 103 | rule digit3 { 104 | segment 105 | { x dist y -dist rz 90 } segment 106 | { x dist y -gap rz 90 } segment 107 | { y -3.16 } segment 108 | { y -6.35 } segment 109 | } 110 | 111 | rule digit2 { 112 | segment 113 | { x dist y -dist rz 90 } segment 114 | { y -3.16 } segment 115 | { x -dist y -gap rz 90 } segment 116 | { y -6.35 } segment 117 | } 118 | 119 | rule digit1 { 120 | { x dist y -dist rz 90 } segment 121 | { x dist y -gap rz 90 } segment 122 | } 123 | 124 | rule digit0 { 125 | segment 126 | { x dist y -dist rz 90 } segment 127 | { x -dist y -dist rz 90 } segment 128 | { x dist y -gap rz 90 } segment 129 | { x -dist y -gap rz 90 } segment 130 | { y -6.35 } segment 131 | } 132 | 133 | rule segment { 134 | { s 2 1 1 } box 135 | { x 1 y 0 rz 45 s 0.707 0.707 1 } box 136 | { x -1 y 0 rz 45 s 0.707 0.707 1 } box 137 | } -------------------------------------------------------------------------------- /Clock/Clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Clock/Clock.png -------------------------------------------------------------------------------- /Clock/SevenSegment.es: -------------------------------------------------------------------------------- 1 | //Seven Segment 2 | #define dist 1.6 3 | #define gap 4.75 4 | 5 | 1 * {x 27.5 y -3.25 z -2.5 s 55 11 5 color #eee} box 6 | display 7 | 8 | 9 | rule display { 10 | 1 * { s 1 1 1} 10 * { x 5 color #111 } digi 11 | } 12 | 13 | rule digi { digit0 } 14 | rule digi { digit1 } 15 | rule digi { digit2 } 16 | rule digi { digit3 } 17 | rule digi { digit4 } 18 | rule digi { digit5 } 19 | rule digi { digit6 } 20 | rule digi { digit7 } 21 | rule digi { digit8 } 22 | rule digi { digit9 } 23 | 24 | 25 | rule digit9 { 26 | segment 27 | { x dist y -dist rz 90 } segment 28 | { x -dist y -dist rz 90 } segment 29 | { x dist y -gap rz 90 } segment 30 | { y -3.16 } segment 31 | { y -6.35 } segment 32 | } 33 | 34 | rule digit8 { 35 | segment 36 | { x dist y -dist rz 90 } segment 37 | { x -dist y -dist rz 90 } segment 38 | { x dist y -gap rz 90 } segment 39 | { x -dist y -gap rz 90 } segment 40 | { y -3.16 } segment 41 | { y -6.35 } segment 42 | } 43 | 44 | rule digit7 { 45 | segment 46 | { x dist y -dist rz 90 } segment 47 | { x dist y -gap rz 90 } segment 48 | } 49 | 50 | rule digit6 { 51 | segment 52 | { x -dist y -dist rz 90 } segment 53 | { x dist y -gap rz 90 } segment 54 | { x -dist y -gap rz 90 } segment 55 | { y -3.16 } segment 56 | { y -6.35 } segment 57 | } 58 | 59 | rule digit5 { 60 | segment 61 | { x -dist y -dist rz 90 } segment 62 | { x dist y -gap rz 90 } segment 63 | { y -3.16 } segment 64 | { y -6.35 } segment 65 | } 66 | 67 | rule digit4 { 68 | { x dist y -dist rz 90 } segment 69 | { x -dist y -dist rz 90 } segment 70 | { x dist y -gap rz 90 } segment 71 | { y -3.16 } segment 72 | } 73 | 74 | rule digit3 { 75 | segment 76 | { x dist y -dist rz 90 } segment 77 | { x dist y -gap rz 90 } segment 78 | { y -3.16 } segment 79 | { y -6.35 } segment 80 | } 81 | 82 | rule digit2 { 83 | segment 84 | { x dist y -dist rz 90 } segment 85 | { y -3.16 } segment 86 | { x -dist y -gap rz 90 } segment 87 | { y -6.35 } segment 88 | } 89 | 90 | rule digit1 { 91 | { x dist y -dist rz 90 } segment 92 | { x dist y -gap rz 90 } segment 93 | } 94 | 95 | rule digit0 { 96 | segment 97 | { x dist y -dist rz 90 } segment 98 | { x -dist y -dist rz 90 } segment 99 | { x dist y -gap rz 90 } segment 100 | { x -dist y -gap rz 90 } segment 101 | { y -6.35 } segment 102 | } 103 | 104 | rule segment { 105 | { s 2 1 1 } box 106 | { x 1 y 0 rz 45 s 0.707 0.707 1 } box 107 | { x -1 y 0 rz 45 s 0.707 0.707 1 } box 108 | } -------------------------------------------------------------------------------- /Clock/SevenSegment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Clock/SevenSegment.png -------------------------------------------------------------------------------- /CubeRotation/CubeRotation1.es: -------------------------------------------------------------------------------- 1 | // Rotation of cube 2 | set background #fff 3 | 4 | //{ x 1 y 3 } //sphere for lighting 5 | { x 0 } r1 6 | { x 1.5 z 1.5 rz 45} r2 7 | { x 3 rz 45 rx 45} r3 8 | 9 | rule r2 md 100 { 10 | 11 | { rx 0 rz 45 color #ead } box 12 | { ry 4.5 } r2 13 | 14 | } 15 | 16 | rule r3 md 50 { 17 | 18 | { rx 35.25 rz 45 color #cd7 } box 19 | { ry 9 } r3 20 | 21 | } 22 | 23 | rule r1 md 100 { 24 | 25 | { rx 0 rz 0 color #7df} box 26 | { ry 4.5 }r1 27 | 28 | } -------------------------------------------------------------------------------- /CubeRotation/CubeRotation1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/CubeRotation/CubeRotation1.png -------------------------------------------------------------------------------- /Dodecahedron/DodecaFractal.es: -------------------------------------------------------------------------------- 1 | // DodecaFractal 2 | set maxdepth 8 3 | //s 0.382 4 | fractal 5 | 6 | rule fractal md 2 > dodeca{ 7 | 8 | { x 1 y 1 z 1 s 0.382} fractal 9 | { x 1 y 1 z -1 s 0.382} fractal 10 | { x 1 y -1 z 1 s 0.382} fractal 11 | { x 1 y -1 z -1 s 0.382} fractal 12 | { x -1 y 1 z 1 s 0.382} fractal 13 | { x -1 y 1 z -1 s 0.382} fractal 14 | { x -1 y -1 z 1 s 0.382} fractal 15 | { x -1 y -1 z -1 s 0.382} fractal 16 | { x 0 y 0.618034 z 1.61803 s 0.382} fractal 17 | { x 0 y 0.618034 z -1.61803 s 0.382} fractal 18 | { x 0 y -0.618034 z 1.61803 s 0.382} fractal 19 | { x 0 y -0.618034 z -1.61803 s 0.382} fractal 20 | { x 0.618034 y 1.61803 z 0 s 0.382} fractal 21 | { x 0.618034 y -1.61803 z 0 s 0.382} fractal 22 | { x -0.618034 y 1.61803 z 0 s 0.382} fractal 23 | { x -0.618034 y -1.61803 z 0 s 0.382} fractal 24 | { x 1.61803 y 0 z 0.618034 s 0.382} fractal 25 | { x 1.61803 y 0 z -0.618034 s 0.382} fractal 26 | { x -1.61803 y 0 z 0.618034 s 0.382} fractal 27 | { x -1.61803 y 0 z -0.618034 s 0.382} fractal 28 | 29 | 30 | } 31 | 32 | rule dodeca{ 33 | 34 | triangle[-1 , 1 , 1 ; 0 , -0.618034 , 1.61803 ; -1.61803 , 0 , 0.618034] 35 | triangle[0 , -0.618034 , 1.61803 ; -1 , -1 , 1 ; -1.61803 , 0 , 0.618034] 36 | triangle[0 , -0.618034 , 1.61803 ; -1 , 1 , 1 ; 0 , 0.618034 , 1.61803] 37 | triangle[1 , 1 , -1 ; -0.618034 , 1.61803 , 0 ; 0 , 0.618034 , -1.61803] 38 | triangle[-0.618034 , 1.61803 , 0 ; -1 , 1 , -1 ; 0 , 0.618034 , -1.61803] 39 | triangle[-0.618034 , 1.61803 , 0 ; 1 , 1 , -1 ; 0.618034 , 1.61803 , 0] 40 | triangle[1 , 1 , 1 ; -0.618034 , 1.61803 , 0 ; 0.618034 , 1.61803 , 0] 41 | triangle[-0.618034 , 1.61803 , 0 ; 1 , 1 , 1 ; 0 , 0.618034 , 1.61803] 42 | triangle[-1 , 1 , 1 ; -0.618034 , 1.61803 , 0 ; 0 , 0.618034 , 1.61803] 43 | triangle[1 , 1 , -1 ; 1.61803 , 0 , -0.618034 ; 0.618034 , 1.61803 , 0] 44 | triangle[1.61803 , 0 , -0.618034 ; 1 , 1 , 1 ; 0.618034 , 1.61803 , 0] 45 | triangle[1 , 1 , 1 ; 1.61803 , 0 , -0.618034 ; 1.61803 , 0 , 0.618034] 46 | triangle[1 , -1 , 1 ; 1 , 1 , 1 ; 1.61803 , 0 , 0.618034] 47 | triangle[1 , 1 , 1 ; 1 , -1 , 1 ; 0 , 0.618034 , 1.61803] 48 | triangle[1 , -1 , 1 ; 0 , -0.618034 , 1.61803 ; 0 , 0.618034 , 1.61803] 49 | triangle[1 , -1 , 1 ; 1 , -1 , -1 ; 0.618034 , -1.61803 , 0] 50 | triangle[1.61803 , 0 , -0.618034 ; 1 , -1 , 1 ; 1.61803 , 0 , 0.618034] 51 | triangle[1 , -1 , 1 ; 1.61803 , 0 , -0.618034 ; 1 , -1 , -1] 52 | triangle[-0.618034 , 1.61803 , 0 ; -1.61803 , 0 , -0.618034 ; -1 , 1 , -1] 53 | triangle[-1.61803 , 0 , -0.618034 ; -1 , 1 , 1 ; -1.61803 , 0 , 0.618034] 54 | triangle[-1.61803 , 0 , -0.618034 ; -0.618034 , 1.61803 , 0 ; -1 , 1 , 1] 55 | triangle[0 , -0.618034 , 1.61803 ; -0.618034 , -1.61803 , 0 ; -1 , -1 , 1] 56 | triangle[-0.618034 , -1.61803 , 0 ; 1 , -1 , 1 ; 0.618034 , -1.61803 , 0] 57 | triangle[1 , -1 , 1 ; -0.618034 , -1.61803 , 0 ; 0 , -0.618034 , 1.61803] 58 | triangle[-1 , -1 , 1 ; -0.618034 , -1.61803 , 0 ; -1.61803 , 0 , 0.618034] 59 | triangle[-0.618034 , -1.61803 , 0 ; -1.61803 , 0 , -0.618034 ; -1.61803 , 0 , 0.618034] 60 | triangle[-1.61803 , 0 , -0.618034 ; -0.618034 , -1.61803 , 0 ; -1 , -1 , -1] 61 | triangle[0 , -0.618034 , -1.61803 ; 1 , 1 , -1 ; 0 , 0.618034 , -1.61803] 62 | triangle[0 , -0.618034 , -1.61803 ; 1.61803 , 0 , -0.618034 ; 1 , 1 , -1] 63 | triangle[1.61803 , 0 , -0.618034 ; 0 , -0.618034 , -1.61803 ; 1 , -1 , -1] 64 | triangle[-1 , 1 , -1 ; 0 , -0.618034 , -1.61803 ; 0 , 0.618034 , -1.61803] 65 | triangle[0 , -0.618034 , -1.61803 ; -1.61803 , 0 , -0.618034 ; -1 , -1 , -1] 66 | triangle[-1.61803 , 0 , -0.618034 ; 0 , -0.618034 , -1.61803 ; -1 , 1 , -1] 67 | triangle[1 , -1 , -1 ; 0 , -0.618034 , -1.61803 ; 0.618034 , -1.61803 , 0] 68 | triangle[-0.618034 , -1.61803 , 0 ; 0 , -0.618034 , -1.61803 ; -1 , -1 , -1] 69 | triangle[0 , -0.618034 , -1.61803 ; -0.618034 , -1.61803 , 0 ; 0.618034 , -1.61803 , 0] 70 | 71 | } -------------------------------------------------------------------------------- /Dodecahedron/DodecaFractal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Dodecahedron/DodecaFractal.png -------------------------------------------------------------------------------- /Dodecahedron/DodecaFractal2.es: -------------------------------------------------------------------------------- 1 | // DodecaFractal2 2 | set maxobjects 260000 3 | set maxdepth 10 4 | //s 0.382 5 | fractal 6 | //dodeca 7 | rule fractal md 2 > dodeca{ 8 | 9 | {s 0.2764 x 0 y 1 z 1.61803 } fractal 10 | {s 0.2764 x 0 y 1 z -1.61803 } fractal 11 | {s 0.2764 x 0 y -1 z 1.61803 } fractal 12 | {s 0.2764 x 0 y -1 z -1.61803 } fractal 13 | {s 0.2764 x 1 y 1.61803 z 0 } fractal 14 | {s 0.2764 x 1 y -1.61803 z 0 } fractal 15 | {s 0.2764 x -1 y 1.61803 z 0 } fractal 16 | {s 0.2764 x -1 y -1.61803 z 0 } fractal 17 | {s 0.2764 x 1.61803 y 0 z 1 } fractal 18 | {s 0.2764 x 1.61803 y 0 z -1 } fractal 19 | {s 0.2764 x -1.61803 y 0 z 1 } fractal 20 | {s 0.2764 x -1.61803 y 0 z -1 } fractal 21 | 22 | 23 | } 24 | 25 | rule dodeca{ 26 | 27 | triangle[0 , 1 , 1.61803 ; 1 , 1.61803 , 0 ; 1.61803 , 0 , 1] 28 | triangle[1 , -1.61803 , 0 ; 0 , -1 , 1.61803 ; 1.61803 , 0 , 1] 29 | triangle[0 , 1 , 1.61803 ; 0 , -1 , 1.61803 ; -1.61803 , 0 , 1] 30 | triangle[0 , -1 , 1.61803 ; 0 , 1 , 1.61803 ; 1.61803 , 0 , 1] 31 | triangle[-1 , 1.61803 , 0 ; 0 , 1 , -1.61803 ; 1 , 1.61803 , 0] 32 | triangle[-1 , 1.61803 , 0 ; 0 , 1 , 1.61803 ; -1.61803 , 0 , 1] 33 | triangle[0 , 1 , 1.61803 ; -1 , 1.61803 , 0 ; 1 , 1.61803 , 0] 34 | triangle[1.61803 , 0 , -1 ; 1 , -1.61803 , 0 ; 1.61803 , 0 , 1] 35 | triangle[1 , 1.61803 , 0 ; 1.61803 , 0 , -1 ; 1.61803 , 0 , 1] 36 | triangle[0 , 1 , -1.61803 ; 1.61803 , 0 , -1 ; 1 , 1.61803 , 0] 37 | triangle[1.61803 , 0 , -1 ; 0 , -1 , -1.61803 ; 1 , -1.61803 , 0] 38 | triangle[0 , -1 , -1.61803 ; 1.61803 , 0 , -1 ; 0 , 1 , -1.61803] 39 | triangle[0 , -1 , -1.61803 ; -1 , -1.61803 , 0 ; 1 , -1.61803 , 0] 40 | triangle[0 , -1 , 1.61803 ; -1 , -1.61803 , 0 ; -1.61803 , 0 , 1] 41 | triangle[-1 , -1.61803 , 0 ; 0 , -1 , 1.61803 ; 1 , -1.61803 , 0] 42 | triangle[-1 , 1.61803 , 0 ; -1.61803 , 0 , -1 ; 0 , 1 , -1.61803] 43 | triangle[-1.61803 , 0 , -1 ; 0 , -1 , -1.61803 ; 0 , 1 , -1.61803] 44 | triangle[-1.61803 , 0 , -1 ; -1 , 1.61803 , 0 ; -1.61803 , 0 , 1] 45 | triangle[-1 , -1.61803 , 0 ; -1.61803 , 0 , -1 ; -1.61803 , 0 , 1] 46 | triangle[-1.61803 , 0 , -1 ; -1 , -1.61803 , 0 ; 0 , -1 , -1.61803] 47 | 48 | } -------------------------------------------------------------------------------- /Dodecahedron/DodecaFractal2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Dodecahedron/DodecaFractal2.png -------------------------------------------------------------------------------- /DragonCurve/DragonCurve.es: -------------------------------------------------------------------------------- 1 | // Dragon Factal 2 | #define displace 0.5 3 | set colorpool list:white,skyblue,#0044dd,#0088ee 4 | set maxdepth 200 5 | set background black 6 | 7 | 1 * {z -1 s 20 20 1 color #999}box 8 | 9 | R1 10 | 11 | rule R1 md 10 > R2 { 12 | {s 0.707 y 1 x displace rz 45 }R1 13 | {s 0.707 y 1 x -displace rz 45 }R1 14 | 15 | } 16 | 17 | rule R2{ 18 | {s 0.707 0.707 1 color random}box 19 | } 20 | 21 | -------------------------------------------------------------------------------- /DragonCurve/DragonCurve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/DragonCurve/DragonCurve.png -------------------------------------------------------------------------------- /FrameFractal/framefractal1.es: -------------------------------------------------------------------------------- 1 | //fractaltree1 2 | #define gap 0.5 3 | set maxdepth 200 4 | set background black 5 | set colorpool list:white,#ff0,#0ff,#f0f 6 | 7 | 8 | //1 * { s 0.01 100 100 color #eee } box 9 | fractal 10 | 11 | rule fractal md 4 { 12 | 13 | { x 0 z -0.5 rz 90 s 0.475 } fractal 14 | { x 0 z 0.5 rz 90 s 0.475} fractal 15 | 16 | { x 0.5 rx 90 s 0.475} fractal 17 | { x -0.5 rx 90 s 0.475} fractal 18 | 19 | { color random } frame 20 | 21 | } 22 | 23 | rule frame { 24 | { s 0.1 0.1 1.1 x -5 z 0 } box 25 | { s 0.1 0.1 1.1 x 5 z 0 } box 26 | { s 1.1 0.1 0.1 x 0 z 5 } box 27 | { s 1.1 0.1 0.1 x 0 z -5 } box 28 | } 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /FrameFractal/framefractal1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/FrameFractal/framefractal1.png -------------------------------------------------------------------------------- /FrameFractal/framefractal2.es: -------------------------------------------------------------------------------- 1 | //fractaltree1 2 | #define gap 0.5 3 | set maxdepth 200 4 | set background white 5 | set colorpool list:white,#fda,#fd6,#acf,#cfa 6 | 7 | 8 | //1 * { s 0.01 100 100 color #eee } box 9 | 2 * {x 1.2 z -1.2 ry 180} 4 * {z -0.6 y -0.6 x 0 rx 90 } fractal 10 | 11 | rule fractal md 20 { 12 | 13 | { x 0.5 y 0.5 z 0.05 rz 90 ry 90 s 0.9 } fractal 14 | //{ x -0.41 y 0.4 rz -90 s 0.82 } fractal 15 | //{ x 0 z 0 rx -90 s 0.475} fractal 16 | 17 | //{ x 0 rx 90 s 0.475} fractal 18 | //{ x 0 rx 0 s 0.475} fractal 19 | 20 | { color random } frame 21 | 22 | } 23 | 24 | rule frame { 25 | { s 0.1 0.1 1.1 x -5 z 0 } box 26 | //{ s 0.1 0.1 1.1 x 5 z 0 } box 27 | { s 1.1 0.1 0.1 x 0 z 5 } box 28 | //{ s 1.1 0.1 0.1 x 0 z -5 } box 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /FrameFractal/framefractal2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/FrameFractal/framefractal2.png -------------------------------------------------------------------------------- /FrameFractal/frameframe1.es: -------------------------------------------------------------------------------- 1 | // Frame Frame 2 | set colorpool list:blue,#0088ff,magenta,white 3 | set background #fff 4 | #define size 0.25 5 | #define offset 0.3125 6 | set maxdepth 7 7 | 8 | 1 *{x 0 y -0.6 s 50 0.1 50 color #eee}box 9 | 10 | R1 11 | 12 | rule R1 md 4 { 13 | { x offset y offset z offset s size } R1 14 | { x offset y -offset z offset s size } R1 15 | { x -offset y -offset z offset s size } R1 16 | { x -offset y offset z offset s size } R1 17 | 18 | { x offset y offset z -offset s size } R1 19 | { x offset y -offset z -offset s size } R1 20 | { x -offset y -offset z -offset s size } R1 21 | { x -offset y offset z -offset s size } R1 22 | { color random } frame 23 | } 24 | 25 | rule frame { 26 | { s 0.1 1.1 0.1 x 5 z 5 } box 27 | { s 0.1 1.1 0.1 x 5 z -5 } box 28 | { s 0.1 1.1 0.1 x -5 z 5 } box 29 | { s 0.1 1.1 0.1 x -5 z -5 } box 30 | 31 | { s 1 0.1 0.1 y 5 z 5 } box 32 | { s 1 0.1 0.1 y 5 z -5 } box 33 | { s 1 0.1 0.1 y -5 z 5 } box 34 | { s 1 0.1 0.1 y -5 z -5 } box 35 | 36 | { s 0.1 0.1 1 y 5 x 5 } box 37 | { s 0.1 0.1 1 y 5 x -5 } box 38 | { s 0.1 0.1 1 y -5 x 5 } box 39 | { s 0.1 0.1 1 y -5 x -5 } box 40 | } -------------------------------------------------------------------------------- /FrameFractal/frameframe1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/FrameFractal/frameframe1.png -------------------------------------------------------------------------------- /FrameFractal/frameframe2.es: -------------------------------------------------------------------------------- 1 | // Frame Frame 2 2 | 3 | set colorpool list:yellow,orange,white,red 4 | set background #fff 5 | #define size 0.4 6 | #define offset 0.5 7 | set maxdepth 6 8 | 1 *{x 0 y 1 s 50 0.1 50 color #eee}box 9 | R1 10 | 11 | rule R1 { 12 | {x offset y offset z offset s size color random} R1 13 | {x offset y -offset z offset s size color random} R1 14 | {x -offset y -offset z offset s size color random} R1 15 | {x -offset y offset z offset s size color random} R1 16 | 17 | {x offset y offset z -offset s size color random} R1 18 | {x offset y -offset z -offset s size color random} R1 19 | {x -offset y -offset z -offset s size color random} R1 20 | {x -offset y offset z -offset s size color random} R1 21 | frame 22 | } 23 | 24 | rule frame { 25 | { s 0.1 1.1 0.1 x 5 z 5 } box 26 | { s 0.1 1.1 0.1 x 5 z -5 } box 27 | { s 0.1 1.1 0.1 x -5 z 5 } box 28 | { s 0.1 1.1 0.1 x -5 z -5 } box 29 | 30 | { s 1 0.1 0.1 y 5 z 5 } box 31 | { s 1 0.1 0.1 y 5 z -5 } box 32 | { s 1 0.1 0.1 y -5 z 5 } box 33 | { s 1 0.1 0.1 y -5 z -5 } box 34 | 35 | { s 0.1 0.1 1 y 5 x 5 } box 36 | { s 0.1 0.1 1 y 5 x -5 } box 37 | { s 0.1 0.1 1 y -5 x 5 } box 38 | { s 0.1 0.1 1 y -5 x -5 } box 39 | } 40 | 41 | set raytracer::shadows false 42 | 43 | // the number of samples controls the quality 44 | // '6' means 6x6 samples per pixels, and is the default. 45 | set raytracer::samples 12 46 | 47 | // dof is depth-of-field. 48 | // Use 'Edit | Show 3D Object Information' to find the correct plane 49 | // comment the line below to disable this. 50 | set raytracer::dof [0.373275,0.06] 51 | 52 | // Set materials either globally, 53 | // or for a selected tag (e.g. 'shiny') 54 | set raytracer::shiny::reflection 0.3 55 | set raytracer::phong [0.5,0.6,0.2] -------------------------------------------------------------------------------- /FrameFractal/frameframe2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/FrameFractal/frameframe2.png -------------------------------------------------------------------------------- /LevyCCurve/LevyCCurve.es: -------------------------------------------------------------------------------- 1 | //Levy C Curve 2 | #define displace 0.5 3 | set maxdepth 200 4 | set colorpool list:white,skyblue,#0044dd,#0088ee 5 | set background white 6 | 7 | 1 * {z -0.0575 s 50 50 0.1 color #666}box 8 | 9 | R1 10 | 11 | rule R1 maxdepth 12 > R2{ 12 | { y 0.5 x displace rz -45 s 0.707 h 40 }R1 13 | { y 0.5 x -displace rz 45 s 0.707 h 40 }R1 14 | 15 | } 16 | 17 | rule R2{ 18 | {s 2.1 0.2 5 color random}box 19 | } 20 | -------------------------------------------------------------------------------- /LevyCCurve/LevyCCurve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/LevyCCurve/LevyCCurve.png -------------------------------------------------------------------------------- /MengerSponge/MengerSponge.es: -------------------------------------------------------------------------------- 1 | #define dis 1 2 | #define siz 1/3 3 | set colorpool list:white,skyblue,#0044dd,#0088ee 4 | set background #000 5 | a2 6 | 7 | rule a2 w 3 maxdepth 3 > d { 8 | 9 | { s siz x dis y dis z 0 h 15} a2 10 | { s siz x dis y -dis z 0 h 15} a2 11 | { s siz x -dis y dis z 0 h 15} a2 12 | { s siz x -dis y -dis z 0 h 15} a2 13 | 14 | { s siz x dis y dis z dis h 15} a2 15 | { s siz x dis y -dis z dis h 15} a2 16 | { s siz x -dis y dis z dis h 15} a2 17 | { s siz x -dis y -dis z dis h 15} a2 18 | 19 | { s siz x dis y dis z -dis h 15} a2 20 | { s siz x dis y -dis z -dis h 15} a2 21 | { s siz x -dis y dis z -dis h 15} a2 22 | { s siz x -dis y -dis z -dis h 15} a2 23 | 24 | { s siz x 0 y dis z dis h 15} a2 25 | { s siz x 0 y -dis z dis h 15} a2 26 | { s siz x -dis y 0 z dis h 15} a2 27 | { s siz x dis y 0 z dis h 15} a2 28 | 29 | { s siz x 0 y dis z -dis h 15} a2 30 | { s siz x 0 y -dis z -dis h 15} a2 31 | { s siz x -dis y 0 z -dis h 15} a2 32 | { s siz x dis y 0 z -dis h 15} a2 33 | 34 | 35 | } 36 | 37 | 38 | rule d w 2 { 39 | {color #07e}box 40 | } 41 | 42 | rule frame { 43 | { s 0.1 1.1 0.1 x 5 z 5 } box 44 | { s 0.1 1.1 0.1 x 5 z -5 } box 45 | { s 0.1 1.1 0.1 x -5 z 5 } box 46 | { s 0.1 1.1 0.1 x -5 z -5 } box 47 | 48 | { s 1 0.1 0.1 y 5 z 5 } box 49 | { s 1 0.1 0.1 y 5 z -5 } box 50 | { s 1 0.1 0.1 y -5 z 5 } box 51 | { s 1 0.1 0.1 y -5 z -5 } box 52 | 53 | { s 0.1 0.1 1 y 5 x 5 } box 54 | { s 0.1 0.1 1 y 5 x -5 } box 55 | { s 0.1 0.1 1 y -5 x 5 } box 56 | { s 0.1 0.1 1 y -5 x -5 } box 57 | } 58 | 59 | set raytracer::shadows false 60 | set raytracer::ambient-occlusion-samples 1 61 | // the number of samples controls the quality 62 | // '6' means 6x6 samples per pixels, and is the default. 63 | set raytracer::samples 16 64 | //set raytracer::dof [0.141542,0.05] 65 | -------------------------------------------------------------------------------- /MengerSponge/MengerSponge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/MengerSponge/MengerSponge.png -------------------------------------------------------------------------------- /MengerSponge/newMenger3.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | 3 | //template::difference-begin 4 | //template::union-begin 5 | //{color #fff}menger 6 | //template::union-end 7 | //{ y 0.5 s 5 1 1 color white } box 8 | //template::difference-end 9 | 10 | set colorpool list:#4f9,#ff0,#0f9,#9f0,#8f3,#4f6 11 | 12 | { color #cdf} menger 13 | 14 | rule menger md 1 > c2 { 15 | { s 1/3 x -1 y -1 color random} menger 16 | { s 1/3 x -1 y -1 z -1 color random} menger 17 | { s 1/3 x -1 y -1 z +1 color random} menger 18 | { s 1/3 x 1 y -1 color random} menger 19 | { s 1/3 x 1 y -1 z -1 color random} menger 20 | { s 1/3 x 1 y -1 z +1 color random} menger 21 | { s 1/3 y -1 z -1 color random} menger 22 | { s 1/3 y -1 z +1 color random} menger 23 | { s 1/3 x -1 y 1 color random} menger 24 | { s 1/3 x -1 y 1 z -1 color random} menger 25 | { s 1/3 x -1 y 1 z +1 color random} menger 26 | { s 1/3 x 1 y 1 color random} menger 27 | { s 1/3 x 1 y 1 z -1 color random} menger 28 | { s 1/3 x 1 y 1 z +1 color random} menger 29 | { s 1/3 y 1 z -1 color random} menger 30 | { s 1/3 y 1 z +1 color random} menger 31 | { s 1/3 x -1 z -1 color random} menger 32 | { s 1/3 x -1 z +1 color random } menger 33 | { s 1/3 x 1 z -1 color random} menger 34 | { s 1/3 x 1 z +1 color random} menger 35 | 36 | } 37 | 38 | rule c2{ 39 | R1 40 | R2 41 | R3 42 | R4 43 | R5 44 | R6 45 | R7 46 | R8 47 | R9 48 | R10 49 | } 50 | 51 | rule R1 md 2 > box{ 52 | { s 1/3 1/3 1 x -1 y -1 } R1 53 | { s 1/3 1/3 1 x -1 y 1 z 0 } R1 54 | { s 1/3 1/3 1 x 1 y 1 z 0 } R1 55 | { s 1/3 1/3 1 x 1 y -1 } R1 56 | } 57 | 58 | 59 | rule R2 md 2 > box{ 60 | { s 1/3 1 1/3 x -1 z -1 } R2 61 | { s 1/3 1 1/3 x -1 z 1 z 0 } R2 62 | { s 1/3 1 1/3 x 1 z 1 z 0 } R2 63 | { s 1/3 1 1/3 x 1 z -1 } R2 64 | } 65 | 66 | rule R3 md 2 > box{ 67 | { s 1 1/3 1/3 y -1 z -1 } R3 68 | { s 1 1/3 1/3 y -1 z 1 z 0 } R3 69 | { s 1 1/3 1/3 y 1 z 1 z 0 } R3 70 | { s 1 1/3 1/3 y 1 z -1 } R3 71 | } 72 | 73 | rule R4 md 1 > box{ 74 | { s 1/9 x 3 y 1 z 4 } R4 75 | { s 1/9 x 3 y 1 z -4 } R4 76 | { s 1/9 x 3 y -1 z 4 } R4 77 | { s 1/9 x 3 y -1 z -4 } R4 78 | 79 | { s 1/9 x 3 y 1 z 2 } R4 80 | { s 1/9 x 3 y 1 z -2 } R4 81 | { s 1/9 x 3 y -1 z 2 } R4 82 | { s 1/9 x 3 y -1 z -2 } R4 83 | ///// 84 | { s 1/9 x -3 y 1 z 4 } R4 85 | { s 1/9 x -3 y 1 z -4 } R4 86 | { s 1/9 x -3 y -1 z 4 } R4 87 | { s 1/9 x -3 y -1 z -4 } R4 88 | 89 | { s 1/9 x -3 y 1 z 2 } R4 90 | { s 1/9 x -3 y 1 z -2 } R4 91 | { s 1/9 x -3 y -1 z 2 } R4 92 | { s 1/9 x -3 y -1 z -2 } R4 93 | } 94 | 95 | rule R5 md 1 > box{ 96 | { s 1/9 x 3 z 1 y 4 } R5 97 | { s 1/9 x 3 z 1 y -4 } R5 98 | { s 1/9 x 3 z -1 y 4 } R5 99 | { s 1/9 x 3 z -1 y -4 } R5 100 | 101 | { s 1/9 x 3 z 1 y 2 } R5 102 | { s 1/9 x 3 z 1 y -2 } R5 103 | { s 1/9 x 3 z -1 y 2 } R5 104 | { s 1/9 x 3 z -1 y -2 } R5 105 | ///// 106 | { s 1/9 x -3 z 1 y 4 } R5 107 | { s 1/9 x -3 z 1 y -4 } R5 108 | { s 1/9 x -3 z -1 y 4 } R5 109 | { s 1/9 x -3 z -1 y -4 } R5 110 | 111 | { s 1/9 x -3 z 1 y 2 } R5 112 | { s 1/9 x -3 z 1 y -2 } R5 113 | { s 1/9 x -3 z -1 y 2 } R5 114 | { s 1/9 x -3 z -1 y -2 } R5 115 | } 116 | 117 | rule R6 md 1 > box{ 118 | { s 1/9 x 1 z 3 y 4 } R6 119 | { s 1/9 x 1 z 3 y -4 } R6 120 | { s 1/9 x 1 z -3 y 4 } R6 121 | { s 1/9 x 1 z -3 y -4 } R6 122 | 123 | { s 1/9 x 1 z 3 y 2 } R6 124 | { s 1/9 x 1 z 3 y -2 } R6 125 | { s 1/9 x 1 z -3 y 2 } R6 126 | { s 1/9 x 1 z -3 y -2 } R6 127 | ///// 128 | { s 1/9 x -1 z 3 y 4 } R6 129 | { s 1/9 x -1 z 3 y -4 } R6 130 | { s 1/9 x -1 z -3 y 4 } R6 131 | { s 1/9 x -1 z -3 y -4 } R6 132 | 133 | { s 1/9 x -1 z 3 y 2 } R6 134 | { s 1/9 x -1 z 3 y -2 } R6 135 | { s 1/9 x -1 z -3 y 2 } R6 136 | { s 1/9 x -1 z -3 y -2 } R6 137 | } 138 | 139 | 140 | rule R7 md 1 > box{ 141 | { s 1/9 x 1 z 4 y 3 } R7 142 | { s 1/9 x 1 z 4 y -3 } R7 143 | { s 1/9 x 1 z -4 y 3 } R7 144 | { s 1/9 x 1 z -4 y -3 } R7 145 | 146 | { s 1/9 x 1 z 2 y 3 } R7 147 | { s 1/9 x 1 z 2 y -3 } R7 148 | { s 1/9 x 1 z -2 y 3 } R7 149 | { s 1/9 x 1 z -2 y -3 } R7 150 | ///// 151 | { s 1/9 x -1 z 4 y 3 } R7 152 | { s 1/9 x -1 z 4 y -3 } R7 153 | { s 1/9 x -1 z -4 y 3 } R7 154 | { s 1/9 x -1 z -4 y -3 } R7 155 | 156 | { s 1/9 x -1 z 2 y 3 } R7 157 | { s 1/9 x -1 z 2 y -3 } R7 158 | { s 1/9 x -1 z -2 y 3 } R7 159 | { s 1/9 x -1 z -2 y -3 } R7 160 | } 161 | 162 | rule R9 md 1 > box{ 163 | { s 1/9 x -1 z 2 y 3 } R9 164 | { s 1/9 x -1 z 2 y -3 } R9 165 | { s 1/9 x -1 z -2 y 3 } R9 166 | { s 1/9 x -1 z -2 y -3 } R9 167 | 168 | { s 1/9 x 1 z 2 y 3 } R9 169 | { s 1/9 x 1 z 2 y -3 } R9 170 | { s 1/9 x 1 z -2 y 3 } R9 171 | { s 1/9 x 1 z -2 y -3 } R9 172 | ///// 173 | { s 1/9 x -2 z -3 y 1 } R9 174 | { s 1/9 x -2 z 3 y -1 } R9 175 | { s 1/9 x -2 z -3 y 1 } R9 176 | { s 1/9 x -2 z -3 y -1 } R9 177 | 178 | { s 1/9 x 2 z -3 y -1 } R9 179 | { s 1/9 x 2 z 3 y -1 } R9 180 | { s 1/9 x 2 z -3 y 1 } R9 181 | { s 1/9 x 2 z -3 y -1 } R9 182 | } 183 | 184 | 185 | 186 | rule R8 md 1 > box{ 187 | { s 1/9 y 1 z 3 x 4 } R8 188 | { s 1/9 y 1 z 3 x -4 } R8 189 | { s 1/9 y 1 z -3 x 4 } R8 190 | { s 1/9 y 1 z -3 x -4 } R8 191 | 192 | { s 1/9 y -1 z 3 x 4 } R8 193 | { s 1/9 y -1 z 3 x -4 } R8 194 | { s 1/9 y -1 z -3 x 4 } R8 195 | { s 1/9 y -1 z -3 x -4 } R8 196 | ///// 197 | { s 1/9 y 3 z 1 x 4 } R8 198 | { s 1/9 y 3 z 1 x -4 } R8 199 | { s 1/9 y 3 z -1 x 4 } R8 200 | { s 1/9 y 3 z -1 x -4 } R8 201 | 202 | { s 1/9 y -3 z 1 x 4 } R8 203 | { s 1/9 y -3 z 1 x -4 } R8 204 | { s 1/9 y -3 z -1 x 4 } R8 205 | { s 1/9 y -3 z -1 x -4 } R8 206 | } 207 | 208 | rule R10 md 1 > box{ 209 | { s 1/9 y 1 z 3 x 2 } R10 210 | { s 1/9 y 1 z 3 x -2 } R10 211 | { s 1/9 y 1 z -3 x 2 } R10 212 | { s 1/9 y 1 z -3 x -2 } R10 213 | 214 | { s 1/9 y -1 z 3 x 2 } R10 215 | { s 1/9 y -1 z 3 x -2 } R10 216 | { s 1/9 y -1 z -3 x 2 } R10 217 | { s 1/9 y -1 z -3 x -2 } R10 218 | ///// 219 | { s 1/9 y 3 z 1 x 2 } R10 220 | { s 1/9 y 3 z 1 x -2 } R10 221 | { s 1/9 y 3 z -1 x 2 } R10 222 | { s 1/9 y 3 z -1 x -2 } R10 223 | 224 | { s 1/9 y -3 z 1 x 2 } R10 225 | { s 1/9 y -3 z 1 x -2 } R10 226 | { s 1/9 y -3 z -1 x 2 } R10 227 | { s 1/9 y -3 z -1 x -2 } R10 228 | } -------------------------------------------------------------------------------- /MengerSponge/newMenger3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/MengerSponge/newMenger3.png -------------------------------------------------------------------------------- /MiscStructures/Building1.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | set background white 3 | //tower 4 | 10 * {y 1.414 } 10 * {z 0.4 x -1.25 ry 36} square 5 | 6 | rule square{ 7 | {s 1 1 0.1 rz 45 color #24e }box 8 | 1 * {x -0.75 s 0.05 1.414 0.05} 10 * { x 2.75 color #888}box 9 | } 10 | 11 | //base 12 | //1 * {y 0.650 s 1 0.1 1}box 13 | 1 * {y 0.21 } 10 * {z 0.4 x -1.25 ry 36} panel 14 | 15 | 1 * {y -0.3 z 2.125 x -0 s 37.25 0.1 37.25 color #555} box 16 | 17 | //roof 18 | 1 * {y 15.34 } 10 * {z 0.4 x -1.25 ry 36} panel 19 | 1 * {y 15.89 z 2.125 x -0 s 3.25 0.1 3.25} 80 * {ry 1.125 color #aaa}box 20 | rule panel{ 21 | {s 1.414 1 0.1 color #24e }box 22 | } 23 | -------------------------------------------------------------------------------- /MiscStructures/Building1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/MiscStructures/Building1.png -------------------------------------------------------------------------------- /Mondrian/3dmondrian1.es: -------------------------------------------------------------------------------- 1 | // 3D Mondrian Cube 1 2 | set background #fff 3 | set colorpool list:#F00,#0404A2,#FFFE33,#FFF 4 | 5 | mondrian 6 | 7 | rule mondrian { 8 | a2 9 | } 10 | 11 | rule a2 w 3 maxdepth 2 > d { 12 | { s 0.3334 1 1 x -1 } a2 13 | { s 0.6666 1 1 x 0.25 } a2 14 | } 15 | 16 | rule a2 w 3 maxdepth 2 > d { 17 | { s 1 0.3334 1 y -1 } a2 18 | { s 1 0.6666 1 y 0.25 } a2 19 | } 20 | 21 | rule a2 w 3 maxdepth 2 > d { 22 | { s 1 1 0.3334 z -1 } a2 23 | { s 1 1 0.6666 z 0.25 } a2 24 | } 25 | 26 | rule a2 w 3 maxdepth 2 > d { 27 | { s 0.5 1 1 x -0.5 } a2 28 | { s 0.5 1 1 x 0.5 } a2 29 | } 30 | 31 | 32 | rule a2 w 3 maxdepth 2 > d { 33 | { s 1 0.5 1 y -0.5 } a2 34 | { s 1 0.5 1 y 0.5 } a2 35 | } 36 | 37 | rule a2 w 3 maxdepth 2 > d { 38 | { s 1 1 0.5 z -0.5 } a2 39 | { s 1 1 0.5 z 0.5 } a2 40 | } 41 | 42 | rule d { 43 | { s 1 1 1 } square 44 | } 45 | 46 | rule square { 47 | { s 0.95 color random } box 48 | { color #eee } frame 49 | } 50 | 51 | rule square { 52 | { s 0.95 color random } box 53 | { color #222 } frame 54 | } 55 | 56 | rule frame { 57 | 58 | { s 0.1 1 0.05 y 0 x 4.5 z 9.5 } box 59 | { s 0.1 1 0.05 y 0 x -4.5 z 9.5 } box 60 | 1 * { rz 90 s 0.1 1 0.05} 1 * { y 0 x -4.5 z 9.5 } box 61 | 1 * { rz -90} 1 * { s 0.1 1 0.05 y 0 x -4.5 z 9.5 } box 62 | 63 | { s 0.1 1 0.05 y 0 x 4.5 z -9.5 } box 64 | { s 0.1 1 0.05 y 0 x -4.5 z -9.5 } box 65 | 66 | 1 * { rz 90 s 0.1 1 0.05 } 1 * { y 0 x -4.5 z -9.5 } box 67 | 1 * { rz -90 } 1 * { s 0.1 1 0.05 y 0 x -4.5 z -9.5 } box 68 | 69 | { s 0.05 0.05 1 y 9.5 x -9.5 z 0 } box 70 | { s 0.05 0.05 1 y 9.5 x 9.5 z 0 } box 71 | 72 | { s 0.05 0.05 1 y -9.5 x -9.5 z 0 } box 73 | { s 0.05 0.05 1 y -9.5 x 9.5 z 0 } box 74 | 75 | } 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Mondrian/3dmondrian2.es: -------------------------------------------------------------------------------- 1 | //3D Mondrian Cube 2 2 | set background #fff 3 | set colorpool list:#F00,#0404A2,#FFFE33,#FFF 4 | mondrian 5 | 6 | rule mondrian { 7 | a2 8 | } 9 | 10 | rule a2 w 3 maxdepth 3 > d { 11 | { s 0.3334 1 1 x -1 } a2 12 | { s 0.6666 1 1 x 0.25 } a2 13 | } 14 | 15 | rule a2 w 3 maxdepth 3 > d { 16 | { s 1 0.3334 1 y -1 } a2 17 | { s 1 0.6666 1 y 0.25 } a2 18 | } 19 | 20 | rule a2 w 3 maxdepth 3 > d { 21 | { s 1 1 0.3334 z -1 } a2 22 | { s 1 1 0.6666 z 0.25 } a2 23 | } 24 | 25 | rule a2 w 3 maxdepth 3 > d { 26 | { s 0.5 1 1 x -0.5 } a2 27 | { s 0.5 1 1 x 0.5 } a2 28 | } 29 | 30 | 31 | rule a2 w 3 maxdepth 3 > d { 32 | { s 1 0.5 1 y -0.5 } a2 33 | { s 1 0.5 1 y 0.5 } a2 34 | } 35 | 36 | rule a2 w 3 maxdepth 3 > d { 37 | { s 1 1 0.5 z -0.5 } a2 38 | { s 1 1 0.5 z 0.5 } a2 39 | } 40 | 41 | rule d { 42 | { s 1 color random} box 43 | } 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Mondrian/3dmondrian3.es: -------------------------------------------------------------------------------- 1 | //3D Mondrian Cube 3 2 | #define dis 0.5 3 | set background #000 4 | set colorpool list:#F00,#0404A2,#FFFE33,#FFF 5 | 6 | 4 * { x 0.5 z -0.5 ry 90 } a2 7 | 1 * { z -0.5 y 0.5 rx 90 } 2 * { z 1 rx 180 } a2 8 | { z -0.5 s 1.1 color #eee } frame 9 | 10 | rule a2 w 3 maxdepth 2 > d { 11 | { s 0.5 x dis y dis } a2 12 | { s 0.5 x -dis y dis } a2 13 | { s 0.5 x dis y -dis } a2 14 | { s 0.5 x -dis y -dis } a2 15 | } 16 | 17 | rule a2 w 3 maxdepth 1 > d { 18 | { s 0.5 x dis y dis } a2 19 | { s 0.5 x -dis y dis} a2 20 | { s 0.5 x dis y -dis } a2 21 | { s 0.5 x -dis y -dis } a2 22 | 23 | } 24 | 25 | rule a2 w 1 maxdepth 2 > d { 26 | { s 0.5 1 1.25 x dis } a2 27 | { s 0.5 1 1.25 x -dis } a2 28 | } 29 | 30 | rule a2 w 1 maxdepth 1 > d { 31 | { s 1 0.5 1.25 y dis } a2 32 | { s 1 0.5 1.25 y -dis } a2 33 | } 34 | 35 | rule d { 36 | { s 0.95 color random } box 37 | { color #eee } frame 38 | } 39 | 40 | rule d { 41 | { s 0.95 color random } box 42 | { color #222 } frame 43 | } 44 | 45 | rule frame { 46 | 47 | { s 0.1 1 0.05 y 0 x 4.5 z 9.5 } box 48 | { s 0.1 1 0.05 y 0 x -4.5 z 9.5 } box 49 | 1 * { rz 90 s 0.1 1 0.05 } 1 * { y 0 x -4.5 z 9.5 } box 50 | 1 * { rz -90 } 1 * { s 0.1 1 0.05 y 0 x -4.5 z 9.5 } box 51 | 52 | { s 0.1 1 0.05 y 0 x 4.5 z -9.5 } box 53 | { s 0.1 1 0.05 y 0 x -4.5 z -9.5 } box 54 | 1 * { rz 90 s 0.1 1 0.05 } 1 * { y 0 x -4.5 z -9.5 } box 55 | 1 * { rz -90} 1 * { s 0.1 1 0.05 y 0 x -4.5 z -9.5 } box 56 | 57 | { s 0.05 0.05 1 y 9.5 x -9.5 z 0 } box 58 | { s 0.05 0.05 1 y 9.5 x 9.5 z 0 } box 59 | 60 | { s 0.05 0.05 1 y -9.5 x -9.5 z 0 } box 61 | { s 0.05 0.05 1 y -9.5 x 9.5 z 0 } box 62 | 63 | } 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /Mondrian/3dmondrian4.es: -------------------------------------------------------------------------------- 1 | //3D Mondrian Cube 4 2 | #define dis 0.55 3 | set colorpool list:#F00,#0404A2,#FFFE33,#FFF 4 | set background #fff 5 | 4 * { x 0.55 z -0.55 ry 90 } a2 6 | 1 * { z -0.55 y 0.55 rx 90 } 2 * { z 1.1 rx 180 } a2 7 | 8 | rule a2 w 3 maxdepth 2 > d { 9 | { s 0.5 0.5 1 x dis y dis } a2 10 | { s 0.5 0.5 1 x -dis y dis } a2 11 | { s 0.5 0.5 1 x dis y -dis } a2 12 | { s 0.5 0.5 1 x -dis y -dis } a2 13 | } 14 | 15 | rule a2 w 3 maxdepth 2 > d { 16 | { s 0.5 0.5 1 x dis y dis } a2 17 | { s 0.5 0.5 1 x -dis y dis } a2 18 | { s 0.5 0.5 1 x dis y -dis } a2 19 | { s 0.5 0.5 1 x -dis y -dis } a2 20 | } 21 | 22 | rule a2 w 3 maxdepth 1 > d { 23 | { s 0.5 0.5 1 x dis y dis } a2 24 | { s 0.5 0.5 1 x -dis y dis } a2 25 | { s 0.5 0.5 1 x dis y -dis } a2 26 | { s 0.5 0.5 1 x -dis y -dis } a2 27 | } 28 | 29 | rule d w 2 { 30 | { s 0.9 0.9 0.01 color random } box 31 | { s 1 1 0.25 color #444 } frame 32 | } 33 | 34 | rule d w 2 { 35 | { s 0.9 0.9 0.01 color random } box 36 | { s 1 1 0.25 color #eee } frame 37 | } 38 | 39 | rule frame { 40 | { s 1.1 0.1 0.1 y 5 x 0 } box 41 | { s 0.1 1 0.1 y 0 x 5 } box 42 | { s 1.1 0.1 0.1 y -5 x 0 } box 43 | { s 0.1 1 0.1 y 0 x -5 } box 44 | } 45 | 46 | 47 | -------------------------------------------------------------------------------- /Mondrian/3dmondrian5.es: -------------------------------------------------------------------------------- 1 | //3D Mondrian Cube 5 2 | #define dis 0.55 3 | set colorpool list:#F00,#0404A2,#FFFE33,#FFF 4 | set background #000 5 | 6 | a2 7 | 8 | rule a2 w 3 maxdepth 2 > d { 9 | 10 | { s 0.5 0.5 0.5 x dis y dis z dis } a2 11 | { s 0.5 0.5 0.5 x -dis y dis z dis } a2 12 | { s 0.5 0.5 0.5 x dis y -dis z dis } a2 13 | { s 0.5 0.5 0.5 x -dis y -dis z dis } a2 14 | 15 | { s 0.5 0.5 0.5 x dis y dis z -dis } a2 16 | { s 0.5 0.5 0.5 x -dis y dis z -dis } a2 17 | { s 0.5 0.5 0.5 x dis y -dis z -dis } a2 18 | { s 0.5 0.5 0.5 x -dis y -dis z -dis } a2 19 | 20 | } 21 | 22 | rule a2 w 3 maxdepth 1 > d { 23 | 24 | { s 0.5 0.5 0.5 x dis y dis z dis } a2 25 | { s 0.5 0.5 0.5 x -dis y dis z dis } a2 26 | { s 0.5 0.5 0.5 x dis y -dis z dis } a2 27 | { s 0.5 0.5 0.5 x -dis y -dis z dis } a2 28 | 29 | { s 0.5 0.5 0.5 x dis y dis z -dis } a2 30 | { s 0.5 0.5 0.5 x -dis y dis z -dis } a2 31 | { s 0.5 0.5 0.5 x dis y -dis z -dis } a2 32 | { s 0.5 0.5 0.5 x -dis y -dis z -dis } a2 33 | 34 | } 35 | 36 | rule a2 w 3 maxdepth 1 > d { 37 | 38 | { s 0.5 0.5 0.5 x dis y dis z dis } a2 39 | { s 0.5 0.5 0.5 x -dis y dis z dis } a2 40 | { s 0.5 0.5 0.5 x dis y -dis z dis } a2 41 | { s 0.5 0.5 0.5 x -dis y -dis z dis } a2 42 | 43 | { s 0.5 0.5 0.5 x dis y dis z -dis } a2 44 | { s 0.5 0.5 0.5 x -dis y dis z -dis } a2 45 | { s 0.5 0.5 0.5 x dis y -dis z -dis } a2 46 | { s 0.5 0.5 0.5 x -dis y -dis z -dis } a2 47 | 48 | } 49 | 50 | rule d w 2 { 51 | { color #eee } frame 52 | { color random } box 53 | } 54 | 55 | rule d w 2 { 56 | { color #222 } frame 57 | { color random } box 58 | } 59 | 60 | 61 | rule frame { 62 | { s 0.1 1.1 0.1 x 5 z 5 } box 63 | { s 0.1 1.1 0.1 x 5 z -5 } box 64 | { s 0.1 1.1 0.1 x -5 z 5 } box 65 | { s 0.1 1.1 0.1 x -5 z -5 } box 66 | 67 | { s 1 0.1 0.1 y 5 z 5 } box 68 | { s 1 0.1 0.1 y 5 z -5 } box 69 | { s 1 0.1 0.1 y -5 z 5 } box 70 | { s 1 0.1 0.1 y -5 z -5 } box 71 | 72 | { s 0.1 0.1 1 y 5 x 5 } box 73 | { s 0.1 0.1 1 y 5 x -5 } box 74 | { s 0.1 0.1 1 y -5 x 5 } box 75 | { s 0.1 0.1 1 y -5 x -5 } box 76 | } -------------------------------------------------------------------------------- /Mondrian/3dmondrian6.es: -------------------------------------------------------------------------------- 1 | // 3D Mondrian Cube 6 2 | set background white 3 | set colorpool list:#F00,#0404A2,#FFFE33,#FFF 4 | 5 | 4 * { x 0.5 z -0.5 ry 90 } a2 6 | 1 * { z -0.5 y 0.5 rx 90 } 2 * { z 1 rx 180 } a2 7 | { z -0.5 s 1.09 color #555 } frame 8 | 9 | 10 | rule a2 w 2 maxdepth 2 > d { 11 | { s 0.3334 1 1 x -1 } a2 12 | { s 0.3334 1 1 x 0.0 } a2 13 | { s 0.3334 1 1 x 1.0 } a2 14 | } 15 | 16 | rule a2 w 2 maxdepth 2 > d { 17 | { s 1 0.3334 1 y -1 } a2 18 | { s 1 0.3334 1 y 1 } a2 19 | { s 1 0.3334 1 y 0 } a2 20 | } 21 | 22 | rule d { 23 | { s 1 1 0.1 } square 24 | } 25 | 26 | rule square { 27 | { s 0.95 color random } box 28 | { color #eee } frame 29 | } 30 | 31 | rule square { 32 | { s 0.95 color random } box 33 | { color #222 } frame 34 | } 35 | 36 | rule frame { 37 | 38 | { s 0.1 1 0.05 y 0 x 4.5 z 9.5 } box 39 | { s 0.1 1 0.05 y 0 x -4.5 z 9.5 } box 40 | 1 * { rz 90 s 0.1 1 0.05} 1 * { y 0 x -4.5 z 9.5 } box 41 | 1 * { rz -90} 1 * { s 0.1 1 0.05 y 0 x -4.5 z 9.5 } box 42 | 43 | { s 0.1 1 0.05 y 0 x 4.5 z -9.5 } box 44 | { s 0.1 1 0.05 y 0 x -4.5 z -9.5 } box 45 | 46 | 1 * { rz 90 s 0.1 1 0.05 } 1 * { y 0 x -4.5 z -9.5 } box 47 | 1 * { rz -90 } 1 * { s 0.1 1 0.05 y 0 x -4.5 z -9.5 } box 48 | 49 | { s 0.05 0.05 1 y 9.5 x -9.5 z 0 } box 50 | { s 0.05 0.05 1 y 9.5 x 9.5 z 0 } box 51 | 52 | { s 0.05 0.05 1 y -9.5 x -9.5 z 0 } box 53 | { s 0.05 0.05 1 y -9.5 x 9.5 z 0 } box 54 | 55 | } 56 | -------------------------------------------------------------------------------- /Mondrian/modmondrian.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | // Mondrian Cube. 3 | set background #fff 4 | 5 | mondrian 6 | 7 | rule mondrian { 8 | // The six faces of the cube 9 | a2 10 | { x -0.5 z -0.5 ry 90 } a2 11 | { x +0.5 z -0.5 ry 90 } a2 12 | { z -1 } a2 13 | { y +0.5 z -0.5 rx 90 } a2 14 | { y -0.5 z -0.5 rx 90 } a2 15 | } 16 | 17 | rule a2 w 2 maxdepth 2 > d { 18 | // Split into two halves in x direction 19 | { s 0.333 1 1 x -1 } a2 20 | { s 0.666 1 1 x 0.26 } a2 21 | } 22 | 23 | rule a2 w 2 maxdepth 2 > d { 24 | // Split into two halves in y direction 25 | { s 1 0.333 1 y -1 } a2 26 | { s 1 0.666 1 y 0.26 } a2 27 | } 28 | 29 | 30 | rule a2 { d } 31 | 32 | // This rule chooses a random color. 33 | rule d { { s 1 1 0.02 color #F00 } square } 34 | rule d { { s 1 1 0.02 color #0404A2 } square } 35 | rule d { { s 1 1 0.02 color #FFFE33 } square } 36 | rule d w 2 { { s 1 1 0.02 color #FFF } square } 37 | 38 | // Draws a framed square 39 | rule square { 40 | { s 0.95 0.95 1 } box 41 | { s 0.05 1 1 b 0 x -10} box 42 | { s 0.05 1 1 b 0 x 10 } box 43 | { s 1.05 0.05 1 b 0 y -10 } box 44 | { s 1.05 0.05 1 b 0 y 10 } box 45 | } 46 | 47 | 48 | set raytracer::shadows false 49 | 50 | // the number of samples controls the quality 51 | // '6' means 6x6 samples per pixels, and is the default. 52 | set raytracer::samples 10 53 | 54 | // dof is depth-of-field. 55 | // Use 'Edit | Show 3D Object Information' to find the correct plane 56 | // comment the line below to disable this. 57 | //set raytracer::dof [0.23,0.07] 58 | 59 | // Set materials either globally, 60 | // or for a selected tag (e.g. 'shiny') 61 | set raytracer::shiny::reflection 0.3 62 | set raytracer::phong [0.5,0.6,0.2] -------------------------------------------------------------------------------- /Mondrian/modmondrian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Mondrian/modmondrian.png -------------------------------------------------------------------------------- /Mondrian/mondrian2.es: -------------------------------------------------------------------------------- 1 | 2 | #define dis 0.55 3 | #define diff 30 4 | //set colorpool list:#ddee00,#ddd 5 | set colorpool list:#F00,#0404A2,#FFFE33,#FFF 6 | set background #fff 7 | //4 * {x 0.55 z -0.55 ry 90 } a2 8 | //1 * {z -0.55 y 0.55 rx 90} 2 * {z 1.1 rx 180} a2 9 | a2 10 | 11 | rule a2 w 3 maxdepth 2 > d { 12 | 13 | { s 0.5 0.5 1 x dis y dis h diff} a2 14 | { s 0.5 0.5 1 x -dis y dis h diff} a2 15 | { s 0.5 0.5 1 x dis y -dis h diff} a2 16 | { s 0.5 0.5 1 x -dis y -dis h diff} a2 17 | 18 | 19 | //box 20 | } 21 | 22 | rule a2 w 3 maxdepth 2 > d { 23 | 24 | { s 0.5 0.5 1 x dis y dis h diff} a2 25 | { s 0.5 0.5 1 x -dis y dis h diff} a2 26 | { s 0.5 0.5 1 x dis y -dis h diff} a2 27 | { s 0.5 0.5 1 x -dis y -dis h diff} a2 28 | 29 | 30 | //box 31 | } 32 | 33 | 34 | 35 | rule a2 w 3 maxdepth 2 > d { 36 | 37 | { s 0.5 0.5 1 x dis y dis h diff} a2 38 | { s 0.5 0.5 1 x -dis y dis h diff} a2 39 | { s 0.5 0.5 1 x dis y -dis h diff} a2 40 | { s 0.5 0.5 1 x -dis y -dis h diff} a2 41 | 42 | 43 | //box 44 | } 45 | 46 | 47 | 48 | rule d w 2 { 49 | {s 0.9 0.9 0.01 color random}box 50 | {s 1 1 0.25 color random}frame 51 | } 52 | 53 | rule frame { 54 | 55 | { s 1.1 0.1 0.1 y 5 x 0 } box 56 | { s 0.1 1 0.1 y 0 x 5 } box 57 | { s 1.1 0.1 0.1 y -5 x 0 } box 58 | { s 0.1 1 0.1 y 0 x -5 } box 59 | } 60 | 61 | 62 | -------------------------------------------------------------------------------- /Mondrian/mondrian2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Mondrian/mondrian2.png -------------------------------------------------------------------------------- /Mondrian/mondrian2d.es: -------------------------------------------------------------------------------- 1 | // Mondrian Cube. 2 | set background #fff 3 | 4 | mondrian 5 | set colorpool list:#F00,#0404A2,#FFFE33,#FFF 6 | 7 | rule mondrian { 8 | // The six faces of the cube 9 | a2 10 | 11 | } 12 | 13 | rule a2 w 3 maxdepth 3 > d { 14 | // Split into two halves in x direction 15 | { s 0.3334 1 1 x -1 h 15} a2 16 | { s 0.6666 1 1 x 0.25 h 25} a2 17 | } 18 | 19 | rule a2 w 5 maxdepth 3 > d { 20 | // Split into two halves in x direction 21 | { s 0.5 1 1 x -0.5 h 15} a2 22 | { s 0.5 1 1 x 0.5 h 30} a2 23 | } 24 | 25 | 26 | rule a2 w 6 maxdepth 3 > d { 27 | // Split into two halves in x direction 28 | { s 1 0.5 1 y -0.5 h 15 } a2 29 | { s 1 0.5 1 y 0.5 h 20} a2 30 | } 31 | 32 | rule a2 w 2 maxdepth 2 > d { 33 | // Split into two halves in x direction 34 | { s 1 0.3334 1 y -1 h 5} a2 35 | { s 1 0.6666 1 y 0.25 h 15} a2 36 | } 37 | 38 | 39 | 40 | 41 | rule d w 2 { 42 | { s 1 1 1 } square 43 | } 44 | 45 | // Draws a framed square 46 | rule square { 47 | { s 0.9 0.9 0.02 color random} box 48 | {color #222}frame 49 | } 50 | 51 | rule frame { 52 | 53 | //{ s 1 0.05 0.05 y 10 x 0 } box 54 | //{ s 1 0.05 0.05 y -10 x 0 } box 55 | 56 | 57 | { s 0.1 1 0.05 y 0 x 4.5 } box 58 | { s 0.1 1 0.05 y 0 x -4.5 } box 59 | 1 * {rz 90 s 0.1 1 0.05} 1 * { y 0 x -4.5 } box 60 | 1 * {rz -90} 1 * { s 0.1 1 0.05 y 0 x -4.5 } box 61 | } 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /Mondrian/mondrian2d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Mondrian/mondrian2d.png -------------------------------------------------------------------------------- /Mondrian/octahedron.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | 3 | #define dis 0.55 4 | #define diff 30 5 | //set colorpool list:#ddee00,#ddd 6 | set colorpool list:#F00,#0404A2,#FFFE33,#FFF 7 | set background #fff 8 | //4 * {x 0.55 z -0.55 ry 90 } a2 9 | //1 * {z -0.55 y 0.55 rx 90} 2 * {z 1.1 rx 180} a2 10 | 1 * {z -0.77 y 0.77 rx 90} 2 * {z 1.54 rx 180} a1 11 | 4 * {x 0.77 z -0.77 rz 0 ry 90 } a1 12 | 13 | 14 | rule a1{ 15 | {s 1 rz 45 }a2 16 | 17 | } 18 | 19 | rule t1{ 20 | {s 1 rx 45 rz 45}tri 21 | 22 | } 23 | 24 | rule a2 w 3 maxdepth 1 > d { 25 | { s 0.5 0.5 1 x dis y dis h diff} a2 26 | { s 0.5 0.5 1 x -dis y dis h diff} a2 27 | { s 0.5 0.5 1 x dis y -dis h diff} a2 28 | { s 0.5 0.5 1 x -dis y -dis h diff} a2 29 | } 30 | 31 | rule a2 w 3 maxdepth 1 > d { 32 | { s 0.5 0.5 1 x dis y dis h diff} a2 33 | { s 0.5 0.5 1 x -dis y dis h diff} a2 34 | { s 0.5 0.5 1 x dis y -dis h diff} a2 35 | { s 0.5 0.5 1 x -dis y -dis h diff} a2 36 | } 37 | 38 | rule a2 w 3 maxdepth 1 > d { 39 | { s 0.5 0.5 1 x dis y dis h diff} a2 40 | { s 0.5 0.5 1 x -dis y dis h diff} a2 41 | { s 0.5 0.5 1 x dis y -dis h diff} a2 42 | { s 0.5 0.5 1 x -dis y -dis h diff} a2 43 | } 44 | 45 | 46 | 47 | 48 | rule d w 2 { 49 | {s 0.9 0.9 0.01 color random}box 50 | {s 1 1 0.25 color random}frame 51 | } 52 | 53 | rule d w 2 { 54 | {s 0.9 0.9 0.01 color random}box 55 | {s 1 1 0.25 color #222}frame 56 | } 57 | 58 | rule d w 2 { 59 | {s 0.9 0.9 0.01 color random}box 60 | {s 1 1 0.25 color #eee}frame 61 | } 62 | 63 | 64 | rule frame { 65 | 66 | { s 1.1 0.1 0.1 y 5 x 0 } box 67 | { s 0.1 1 0.1 y 0 x 5 } box 68 | { s 1.1 0.1 0.1 y -5 x 0 } box 69 | { s 0.1 1 0.1 y 0 x -5 } box 70 | } 71 | 72 | rule tri { 73 | triangle[-0.5,0.1,0;0.5,0.1,0;0,0.1,0.866] 74 | triangle[-0.5,-0.1,0;0.5,-0.1,0;0,-0.1,0.866] 75 | } 76 | 77 | -------------------------------------------------------------------------------- /Mondrian/octahedron.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Mondrian/octahedron.png -------------------------------------------------------------------------------- /NightCity/nightCity.es: -------------------------------------------------------------------------------- 1 | 2 | // Write EisenScript code here...seed=35 3 | set background #000 4 | set colorpool list:gray,#aaa,#999,#ddd,#ccc 5 | 6 | { z 0.01 s 1 1 0.01 color #f00 } box 7 | 8 | { z 0.01 x 1 s 1 1 0.01 color #00f } box 9 | { z 0.01 x -1 s 1 1 0.01 color #00f } box 10 | { z 0.01 y 1 s 1 1 0.01 color #00f } box 11 | { z 0.01 y -1 s 1 1 0.01 color #00f } box 12 | 13 | a2 14 | rule a2 w 3 maxdepth 3 > d { 15 | 16 | { s 0.5 0.5 0.5 x 0.5 y 0.5 h 45} a2 17 | { s 0.5 0.5 0.5 x -0.5 y 0.5 h 10} a2 18 | { s 0.5 0.5 0.5 x 0.5 y -0.5 h 60} a2 19 | { s 0.5 0.5 0.5 x -0.5 y -0.5 h 30} a2 20 | 21 | } 22 | 23 | rule a2 w 3 maxdepth 3 > d { 24 | 25 | { s 0.5 0.5 0.5 x 0.5 y 0.5 h 5} a2 26 | { s 0.5 0.5 0.5 x -0.5 y 0.5 h 15} a2 27 | { s 0.5 0.5 0.5 x 0.5 y -0.5 h 45} a2 28 | { s 0.5 0.5 0.5 x -0.5 y -0.5 h 45} a2 29 | 30 | } 31 | 32 | rule a2 w 2 maxdepth 2 > d { 33 | 34 | { s 0.5 1 1.75 x 0.5 y 0 h 5} a2 35 | { s 0.5 1 1.75 x -0.5 y 0 h 15} a2 36 | 37 | } 38 | 39 | rule a2 w 2 maxdepth 2 > d { 40 | 41 | { s 1 0.5 1.75 x 0 y 0.5 h 5} a2 42 | { s 1 0.5 1.75 x 0 y -0.5 h 15} a2 43 | 44 | } 45 | 46 | 47 | 48 | 49 | rule d w 2 { 50 | { s 0.9 0.9 0.25 color random} box 51 | } 52 | 53 | 54 | -------------------------------------------------------------------------------- /NightCity/nightCity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/NightCity/nightCity.png -------------------------------------------------------------------------------- /Pythagoras/PythagorasTree.es: -------------------------------------------------------------------------------- 1 | // Pythagoras Tree 2 | #define displace 0.5 3 | set maxdepth 12 4 | set background white 5 | 6 | R1 7 | 8 | rule R1 maxdepth 11 { 9 | { y 1 x displace rz -45 s 0.707 h 40 } R1 10 | { y 1 x -displace rz 45 s 0.707 h 40 } R1 11 | box 12 | } 13 | 14 | -------------------------------------------------------------------------------- /Pythagoras/PythagorasTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Pythagoras/PythagorasTree.png -------------------------------------------------------------------------------- /Pythagoras/TestPytree1.es: -------------------------------------------------------------------------------- 1 | // 3d pythagoras tree with random placement 2 | set maxdepth 12 3 | 4 | R1 5 | 6 | rule R1 md 1 > R1{ 7 | { y 1 x 0.5 s 0.707 rz -45 h 10 }R1 8 | { y 1 x -0.5 s 0.707 rz 45 h 10 }R1 9 | box 10 | } 11 | 12 | rule R1 md 1 > R1{ 13 | { y 1 z 0.5 s 0.707 rx 45 h 10 }R1 14 | { y 1 z -0.5 s 0.707 rx -45 h 10 }R1 15 | box 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Pythagoras/TestPytree2.es: -------------------------------------------------------------------------------- 1 | // 60 and 30 pythagoras tree with flipping on each level 2 | set maxdepth 13 3 | 4 | R1 5 | 6 | rule R1 md 1 > R2{ 7 | { y 0.842 x 0.5915 s 0.5 rz -60 h 10 }R1 8 | { y 1.092 x -0.3415 s 0.866 rz 30 h 10 }R1 9 | box 10 | } 11 | 12 | rule R2 md 1 > R1{ 13 | { y 0.842 x -0.5915 s 0.5 rz 60 h 10 }R2 14 | { y 1.092 x 0.3415 s 0.866 rz -30 h 10 }R2 15 | box 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Pythagoras/TestPytree3.es: -------------------------------------------------------------------------------- 1 | //set maxobjects 20 2 | set maxdepth 11 3 | branch 4 | rule branch { 5 | { y 1 x -0.5 s 0.707 rz 45 ry -90 } branch 6 | { y 1 x 0.5 s 0.707 rz -45 ry -90 } branch 7 | box 8 | } 9 | -------------------------------------------------------------------------------- /Pythagoras/TestPytree4.es: -------------------------------------------------------------------------------- 1 | //pytree 60 30 with consecutive rotation on each level randomly 2 | set maxdepth 15 3 | R1 4 | 5 | rule R1 md 1 > R1 { 6 | { y 0.842 x 0.5915 s 0.5 rz -60 h 10 }R1 7 | { y 1.092 x -0.3415 s 0.866 rz 30 h 10 }R1 8 | square 9 | } 10 | 11 | rule R1 md 1 > R1{ 12 | { y 0.842 z 0.5915 s 0.5 rx 60 h 10 }R1 13 | { y 1.092 z -0.3415 s 0.866 rx -30 h 10 }R1 14 | square 15 | } 16 | 17 | rule square w 10 { 18 | { color #ffffff } box 19 | } 20 | 21 | rule square w 5 { 22 | { color #0000ff } box 23 | } 24 | 25 | -------------------------------------------------------------------------------- /Pythagoras/TestPytree5.es: -------------------------------------------------------------------------------- 1 | //50 40 degree tree flipped each level 2 | set maxdepth 12 3 | 4 | R1 5 | 6 | rule R1 md 1 > R2{ 7 | { y 0.9530 x 0.5396 s 0.6428 rz -50 h 10 }R1 8 | { y 1.04 x -0.4528 s 0.766 rz 40 h 10 }R1 9 | square 10 | } 11 | 12 | rule R2 md 1 > R1{ 13 | { y 0.9530 x -0.5396 s 0.6428 rz 50 h 10 }R2 14 | { y 1.04 x 0.4528 s 0.766 rz -40 h 10 }R2 15 | square 16 | } 17 | 18 | rule square w 3{ 19 | {color #ff0000} box 20 | } 21 | 22 | rule square w 10{ 23 | {color #ffffff} box 24 | } 25 | -------------------------------------------------------------------------------- /Pythagoras/TestPytree6.es: -------------------------------------------------------------------------------- 1 | //pytree 70,20 with consecutive rotation on each level randomly 2 | set maxdepth 13 3 | 4 | tree1 5 | 6 | rule tree1 md 1 > tree2 { 7 | { y 0.719 x 0.6022 s 0.3420 rz -70 } tree1 8 | { y 1.102 x -0.2192 s 0.9397 rz 20 } tree1 9 | square 10 | } 11 | 12 | rule tree2 md 1 > tree1 { 13 | { y 0.719 x -0.6022 s 0.3420 rz 70 } tree2 14 | { y 1.102 x 0.2192 s 0.9397 rz -20 } tree2 15 | square 16 | } 17 | 18 | rule square w 2 { 19 | { color #ff0000 } box 20 | } 21 | 22 | rule square w 10 { 23 | { color #eeeeee } box 24 | } 25 | -------------------------------------------------------------------------------- /Pythagoras/pyrandom.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | // Write EisenScript code here... 3 | 4 | set maxdepth 12 5 | 1 * { rz 180} R1 6 | 7 | 8 | rule R1 maxdepth 5 > R1{ 9 | { z 1 y 0.5 s 0.707 rx -45 h 10 }R1 box 10 | { z 1 y -0.5 s 0.707 rx 45 h 10 }R1 box 11 | } 12 | 13 | rule R1 maxdepth 5 > R1{ 14 | { z 1 x 0.5 s 0.707 ry -45 h 10 }R1 box 15 | { z 1 x -0.5 s 0.707 ry 45 h 10 }R1 box 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Pythagoras/pyrandom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Pythagoras/pyrandom.png -------------------------------------------------------------------------------- /Pythagoras/pytree2.es: -------------------------------------------------------------------------------- 1 | //Pythagoras Tree 2 2 | #define displace 0.51 3 | set maxdepth 200 4 | set background white 5 | 6 | 1 * {y -0.6 s 150 0.1 150 color #999}box 7 | R1 8 | 9 | rule R1 maxdepth 9 { 10 | { y 1.1 x displace rz -45 s 0.707 h 40 } R1 11 | { y 1.1 x -displace rz 45 s 0.707 h 40 } R1 12 | { color #fff } frame 13 | { } d 14 | } 15 | 16 | rule R2 { 17 | { s 1.5 h 140 } sphere 18 | } 19 | 20 | rule d{ 21 | { s 0.1 0.9 0.9 x 5 } box 22 | { s 0.1 0.9 0.9 x -5 } box 23 | 24 | { s 0.9 0.1 0.9 y 5 } box 25 | { s 0.9 0.1 0.9 y -5 } box 26 | 27 | { s 0.9 0.9 0.1 z 5 } box 28 | { s 0.9 0.9 0.1 z -5 } box 29 | } 30 | 31 | rule frame { 32 | { s 0.1 1.1 0.1 x 5 z 5 } box 33 | { s 0.1 1.1 0.1 x 5 z -5 } box 34 | { s 0.1 1.1 0.1 x -5 z 5 } box 35 | { s 0.1 1.1 0.1 x -5 z -5 } box 36 | 37 | { s 1 0.1 0.1 y 5 z 5 } box 38 | { s 1 0.1 0.1 y 5 z -5 } box 39 | { s 1 0.1 0.1 y -5 z 5 } box 40 | { s 1 0.1 0.1 y -5 z -5 } box 41 | 42 | { s 0.1 0.1 1 y 5 x 5 } box 43 | { s 0.1 0.1 1 y 5 x -5 } box 44 | { s 0.1 0.1 1 y -5 x 5 } box 45 | { s 0.1 0.1 1 y -5 x -5 } box 46 | } -------------------------------------------------------------------------------- /Pythagoras/pytree2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Pythagoras/pytree2.png -------------------------------------------------------------------------------- /Pythagoras/pytree3d.es: -------------------------------------------------------------------------------- 1 | //pytree 3d 2 | #define displace 0.25 3 | 4 | set maxdepth 200 5 | set background white 6 | 7 | R1 8 | 9 | rule R1 maxdepth 5 > R2{ 10 | { y 0.75 x displace rz -45 s 0.707 h 40 }R1 11 | { y 0.75 x -displace rz 45 s 0.707 h 40 }R1 12 | 13 | { y 0.75 z displace rx 45 s 0.707 h 40 }R1 14 | { y 0.75 z -displace rx -45 s 0.707 h 40 }R1 15 | 16 | {s 0.1 1 0.1 } box 17 | } 18 | 19 | rule R2{ 20 | {s 0.1 1 0.1 } box 21 | {y 0.5 s 0.5 color #e87}sphere 22 | 23 | } 24 | 25 | rule d{ 26 | { s 0.1 0.9 0.9 x 5 } box 27 | { s 0.1 0.9 0.9 x -5 } box 28 | 29 | { s 0.9 0.1 0.9 y 5 } box 30 | { s 0.9 0.1 0.9 y -5 } box 31 | 32 | { s 0.9 0.9 0.1 z 5 } box 33 | { s 0.9 0.9 0.1 z -5 } box 34 | } 35 | 36 | rule frame { 37 | { s 0.1 1.1 0.1 x 5 z 5 } box 38 | { s 0.1 1.1 0.1 x 5 z -5 } box 39 | { s 0.1 1.1 0.1 x -5 z 5 } box 40 | { s 0.1 1.1 0.1 x -5 z -5 } box 41 | 42 | { s 1 0.1 0.1 y 5 z 5 } box 43 | { s 1 0.1 0.1 y 5 z -5 } box 44 | { s 1 0.1 0.1 y -5 z 5 } box 45 | { s 1 0.1 0.1 y -5 z -5 } box 46 | 47 | { s 0.1 0.1 1 y 5 x 5 } box 48 | { s 0.1 0.1 1 y 5 x -5 } box 49 | { s 0.1 0.1 1 y -5 x 5 } box 50 | { s 0.1 0.1 1 y -5 x -5 } box 51 | } 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Pythagoras/pytree3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Pythagoras/pytree3d.png -------------------------------------------------------------------------------- /Pythagoras/pytree3d4570flipped.es: -------------------------------------------------------------------------------- 1 | // 3d pytree rand flip 120 154 seed 50 2 | set md 14 3 | //set colorpool list:#4f9,#ff0,#0f9,#9f0,#8f3,#4f6 4 | set colorpool list:white,#f9b,#fb9,#b9f,#9bf,#bf9,#9fb 5 | 6 | R1 7 | 8 | // 45 degree 9 | rule R1 w 2 md 1 > R1{ 10 | { y 1 x 0.5 s 0.707 rz -45 h 10 }R1 11 | { y 1 x -0.5 s 0.707 rz 45 h 10 }R1 12 | square 13 | } 14 | 15 | rule R1 w 2 md 1 > R1{ 16 | { y 1 z 0.5 s 0.707 rx 45 h 10 }R1 17 | { y 1 z -0.5 s 0.707 rx -45 h 10 }R1 18 | square 19 | } 20 | 21 | //70 20 degree tree flipped each level 22 | rule R1 w 15 md 5 > R2 { 23 | { y 0.719 x 0.6022 s 0.3420 rz -70 } R1 24 | { y 1.102 x -0.2192 s 0.9397 rz 20 } R1 25 | square 26 | } 27 | 28 | rule R2 w 15 md 2 > R1 { 29 | { y 0.719 x -0.6022 s 0.3420 rz 70 } R2 30 | { y 1.102 x 0.2192 s 0.9397 rz -20 } R2 31 | square 32 | } 33 | 34 | //70 20 3d degree tree flipped each level 35 | rule R1 w 15 md 2 > R2 { 36 | { y 0.719 z -0.6022 s 0.3420 rx -70 } R1 37 | { y 1.102 z 0.2192 s 0.9397 rx 20 } R1 38 | square 39 | } 40 | 41 | rule R2 w 15 md 3 > R1 { 42 | { y 0.719 z 0.6022 s 0.3420 rx 70 } R2 43 | { y 1.102 z -0.2192 s 0.9397 rx -20 } R2 44 | square 45 | } 46 | 47 | rule square w 10 { 48 | { color random } box 49 | } -------------------------------------------------------------------------------- /Pythagoras/pytree3d4570flipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Pythagoras/pytree3d4570flipped.png -------------------------------------------------------------------------------- /Pythagoras/pytree3drandFlip.es: -------------------------------------------------------------------------------- 1 | // 3d pytree rand flip 2 | set md 16 3 | set colorpool list:#4f9,#ff0,#0f9,#9f0,#8f3,#4f6 4 | 5 | R1 6 | 7 | // 45 degree 8 | rule R1 md 1 > R1{ 9 | { y 1 x 0.5 s 0.707 rz -45 h 10 }R1 10 | { y 1 x -0.5 s 0.707 rz 45 h 10 }R1 11 | square 12 | } 13 | 14 | rule R1 md 1 > R1{ 15 | { y 1 z 0.5 s 0.707 rx 45 h 10 }R1 16 | { y 1 z -0.5 s 0.707 rx -45 h 10 }R1 17 | square 18 | } 19 | 20 | // 60 and 30 pythagoras tree with flipping on each level 21 | rule R1 md 1 > R2{ 22 | { y 0.842 x 0.5915 s 0.5 rz -60 h 10 }R1 23 | { y 1.092 x -0.3415 s 0.866 rz 30 h 10 }R1 24 | square 25 | } 26 | 27 | rule R2 md 1 > R1{ 28 | { y 0.842 x -0.5915 s 0.5 rz 60 h 10 }R2 29 | { y 1.092 x 0.3415 s 0.866 rz -30 h 10 }R2 30 | square 31 | } 32 | 33 | //60 30 3d 34 | rule R1 md 1 > R2 { 35 | { y 0.842 z -0.5915 s 0.5 rx -60 h 10 }R1 36 | { y 1.092 z 0.3415 s 0.866 rx 30 h 10 }R1 37 | square 38 | } 39 | 40 | rule R2 md 1 > R1{ 41 | { y 0.842 z 0.5915 s 0.5 rx 60 h 10 }R2 42 | { y 1.092 z -0.3415 s 0.866 rx -30 h 10 }R2 43 | square 44 | } 45 | 46 | 47 | //50 40 degree tree flipped each level 48 | rule R1 md 1 > R2{ 49 | { y 0.9530 x 0.5396 s 0.6428 rz -50 h 10 }R1 50 | { y 1.04 x -0.4528 s 0.766 rz 40 h 10 }R1 51 | square 52 | } 53 | 54 | rule R2 md 1 > R1{ 55 | { y 0.9530 x -0.5396 s 0.6428 rz 50 h 10 }R2 56 | { y 1.04 x 0.4528 s 0.766 rz -40 h 10 }R2 57 | square 58 | } 59 | 60 | //50 40 3d degree tree flipped each level 61 | rule R1 md 1 > R2{ 62 | { y 0.9530 z -0.5396 s 0.6428 rx -50 }R1 63 | { y 1.04 z 0.4528 s 0.766 rx 40}R1 64 | square 65 | } 66 | 67 | rule R2 md 1 > R1{ 68 | { y 0.9530 z 0.5396 s 0.6428 rx 50 }R2 69 | { y 1.04 z -0.4528 s 0.766 rx -40 }R2 70 | square 71 | } 72 | 73 | //70 20 degree tree flipped each level 74 | rule R1 md 1 > R2 { 75 | { y 0.719 x 0.6022 s 0.3420 rz -70 } R1 76 | { y 1.102 x -0.2192 s 0.9397 rz 20 } R1 77 | square 78 | } 79 | 80 | rule R2 md 1 > R1 { 81 | { y 0.719 x -0.6022 s 0.3420 rz 70 } R2 82 | { y 1.102 x 0.2192 s 0.9397 rz -20 } R2 83 | square 84 | } 85 | 86 | //70 20 3d degree tree flipped each level 87 | rule R1 md 1 > R2 { 88 | { y 0.719 z -0.6022 s 0.3420 rx -70 } R1 89 | { y 1.102 z 0.2192 s 0.9397 rx 20 } R1 90 | square 91 | } 92 | 93 | rule R2 md 1 > R1 { 94 | { y 0.719 z 0.6022 s 0.3420 rx 70 } R2 95 | { y 1.102 z -0.2192 s 0.9397 rx -20 } R2 96 | square 97 | } 98 | 99 | rule square w 10 { 100 | { color random } box 101 | } 102 | -------------------------------------------------------------------------------- /Pythagoras/pytree3drandFlip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Pythagoras/pytree3drandFlip.png -------------------------------------------------------------------------------- /Pythagoras/pytreeRandFlip.es: -------------------------------------------------------------------------------- 1 | //Pytree with random angle and flipped at each level 2 | //seed number 64 3 | 4 | 5 | set background #fff 6 | 7 | set colorpool list:#fff,#ff0,#f0f,#0ff,#fff 8 | set maxdepth 19 9 | 10 | R1 11 | 12 | rule R1{ tree70 } 13 | rule R1{ tree50 } 14 | rule R1{ tree60 } 15 | rule R1{ tree45 } 16 | 17 | //70 20 flipped pytree 18 | 19 | rule tree70 w 2 md 1 > tree20 { 20 | { y 0.719 x 0.6022 s 0.3420 rz -70 } tree70 21 | { y 1.102 x -0.2192 s 0.9397 rz 20 } tree70 22 | { blend #ff0 0.4 sat 0.5} box 23 | //{ color random } box 24 | } 25 | 26 | rule tree20 w 2 md 1 > R1 { 27 | { y 0.719 x -0.6022 s 0.3420 rz 70 } tree20 28 | { y 1.102 x 0.2192 s 0.9397 rz -20 } tree20 29 | { blend #ff0 0.4 sat 0.5} box 30 | //{ color random } box 31 | } 32 | 33 | 34 | //50 40 flipped pytree 35 | 36 | rule tree50 md 1 > tree40 { 37 | { y 0.9530 x 0.5396 s 0.6428 rz -50 }tree50 38 | { y 1.04 x -0.4528 s 0.766 rz 40 }tree50 39 | { blend #f0f 0.4 } box 40 | //{ color random} box 41 | } 42 | 43 | rule tree40 md 1 > R1 { 44 | { y 0.9530 x -0.5396 s 0.6428 rz 50 }tree40 45 | { y 1.04 x 0.4528 s 0.766 rz -40 }tree40 46 | { blend #f0f 0.4 } box 47 | //{ color random } box 48 | } 49 | 50 | 51 | //60 30 flipped pytree 52 | 53 | rule tree60 md 1 > tree30 { 54 | { y 0.842 x 0.5915 s 0.5 rz -60 }tree60 55 | { y 1.092 x -0.3415 s 0.866 rz 30 }tree60 56 | { blend #0ff 0.4 } box 57 | //{ color random } box 58 | } 59 | 60 | rule tree30 md 1 > R1{ 61 | { y 0.842 x -0.5915 s 0.5 rz 60 }tree30 62 | { y 1.092 x 0.3415 s 0.866 rz -30 }tree30 63 | { blend #0ff 0.4 } box 64 | //{ color random } box 65 | } 66 | 67 | //45 pytree 68 | 69 | rule tree45 md 1 > R1{ 70 | { y 1 x 0.5 s 0.707 rz -45 }tree45 71 | { y 1 x -0.5 s 0.707 rz 45 }tree45 72 | { color #fff } box 73 | //{ color random } box 74 | } 75 | 76 | //rule for coloring box 77 | 78 | rule square w 2 { 79 | { color #ff0000 } box 80 | } 81 | 82 | rule square w 10 { 83 | { color #eeeeee } box 84 | } 85 | -------------------------------------------------------------------------------- /Pythagoras/pytreeRandFlip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Pythagoras/pytreeRandFlip.png -------------------------------------------------------------------------------- /Pythagoras/randomFramePytree.es: -------------------------------------------------------------------------------- 1 | // 3d pytree rand flip 120 154 seed 50 2 | set md 12 3 | set colorpool list:white,#f00,#0f0,#00f,#ff0,#0ff,#f0f 4 | set background #fff 5 | 6 | {color random}R1 7 | 8 | 9 | // 45 degree 10 | rule R1 w 2 md 1 > R1{ 11 | { y 1 x 0.5 s 0.707 rz -45 h 10 }R1 12 | { y 1 x -0.5 s 0.707 rz 45 h 10 }R1 13 | square 14 | } 15 | 16 | rule R1 w 2 md 1 > R1{ 17 | { y 1 z 0.5 s 0.707 rx 45 h 10 }R1 18 | { y 1 z -0.5 s 0.707 rx -45 h 10 }R1 19 | square 20 | } 21 | 22 | //70 20 degree tree flipped each level 23 | rule R1 w 15 md 5 > R2 { 24 | { y 0.719 x 0.6022 s 0.3420 rz -70 } R1 25 | { y 1.102 x -0.2192 s 0.9397 rz 20 } R1 26 | square 27 | } 28 | 29 | rule R2 w 15 md 2 > R1 { 30 | { y 0.719 x -0.6022 s 0.3420 rz 70 } R2 31 | { y 1.102 x 0.2192 s 0.9397 rz -20 } R2 32 | square 33 | } 34 | 35 | //70 20 3d degree tree flipped each level 36 | rule R1 w 15 md 2 > R2 { 37 | { y 0.719 z -0.6022 s 0.3420 rx -70 } R1 38 | { y 1.102 z 0.2192 s 0.9397 rx 20 } R1 39 | square 40 | } 41 | 42 | rule R2 w 15 md 3 > R1 { 43 | { y 0.719 z 0.6022 s 0.3420 rx 70 } R2 44 | { y 1.102 z -0.2192 s 0.9397 rx -20 } R2 45 | square 46 | } 47 | 48 | rule square w 10 { 49 | {a 0.5 color random s 0.91 } d 50 | { color #fff s 0.91} frame 51 | //sphere 52 | } 53 | 54 | 55 | //{ color #fff } frame 56 | //{ } d 57 | 58 | 59 | 60 | 61 | rule d{ 62 | { s 0.1 0.9 0.9 x 5 a 0.5} box 63 | { s 0.1 0.9 0.9 x -5 a 0.5} box 64 | 65 | { s 0.9 0.1 0.9 y 5 a 0.5} box 66 | { s 0.9 0.1 0.9 y -5 a 0.5} box 67 | 68 | { s 0.9 0.9 0.1 z 5 a 0.5} box 69 | { s 0.9 0.9 0.1 z -5 a 0.5} box 70 | } 71 | 72 | rule frame { 73 | { s 0.1 1.1 0.1 x 5 z 5 } box 74 | { s 0.1 1.1 0.1 x 5 z -5 } box 75 | { s 0.1 1.1 0.1 x -5 z 5 } box 76 | { s 0.1 1.1 0.1 x -5 z -5 } box 77 | 78 | { s 1 0.1 0.1 y 5 z 5 } box 79 | { s 1 0.1 0.1 y 5 z -5 } box 80 | { s 1 0.1 0.1 y -5 z 5 } box 81 | { s 1 0.1 0.1 y -5 z -5 } box 82 | 83 | { s 0.1 0.1 1 y 5 x 5 } box 84 | { s 0.1 0.1 1 y 5 x -5 } box 85 | { s 0.1 0.1 1 y -5 x 5 } box 86 | { s 0.1 0.1 1 y -5 x -5 } box 87 | } -------------------------------------------------------------------------------- /Pythagoras/randomFramePytree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Pythagoras/randomFramePytree.png -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Collection of struture synth code. 2 | -------------------------------------------------------------------------------- /RandomCube/3drandcube.es: -------------------------------------------------------------------------------- 1 | //3d rand cube 17,18 2 | #define dis 0.55 3 | set colorpool list:white,skyblue,#0044dd,#0088ee 4 | set background #fff 5 | 6 | 7 | //1 * {z -0.6 s 50 50 0.1 color #bbb}box 8 | 9 | a2 10 | 11 | rule a2 w 3 maxdepth 2 > d { 12 | 13 | { s 0.5 0.5 0.5 x dis y dis z dis h 15} a2 14 | { s 0.5 0.5 0.5 x -dis y dis z dis h 25} a2 15 | { s 0.5 0.5 0.5 x dis y -dis z dis h 15} a2 16 | { s 0.5 0.5 0.5 x -dis y -dis z dis h 25} a2 17 | 18 | { s 0.5 0.5 0.5 x dis y dis z -dis h 15} a2 19 | { s 0.5 0.5 0.5 x -dis y dis z -dis h 25} a2 20 | { s 0.5 0.5 0.5 x dis y -dis z -dis h 15} a2 21 | { s 0.5 0.5 0.5 x -dis y -dis z -dis h 25} a2 22 | 23 | } 24 | 25 | rule a2 w 3 maxdepth 1 > d { 26 | 27 | { s 0.5 0.5 0.5 x dis y dis z dis h 15} a2 28 | { s 0.5 0.5 0.5 x -dis y dis z dis h 25} a2 29 | { s 0.5 0.5 0.5 x dis y -dis z dis h 15} a2 30 | { s 0.5 0.5 0.5 x -dis y -dis z dis h 25} a2 31 | 32 | { s 0.5 0.5 0.5 x dis y dis z -dis h 15} a2 33 | { s 0.5 0.5 0.5 x -dis y dis z -dis h 25} a2 34 | { s 0.5 0.5 0.5 x dis y -dis z -dis h 15} a2 35 | { s 0.5 0.5 0.5 x -dis y -dis z -dis h 25} a2 36 | 37 | } 38 | 39 | rule a2 w 3 maxdepth 1 > d { 40 | 41 | { s 0.5 0.5 0.5 x dis y dis z dis h 15} a2 42 | { s 0.5 0.5 0.5 x -dis y dis z dis h 25} a2 43 | { s 0.5 0.5 0.5 x dis y -dis z dis h 15} a2 44 | { s 0.5 0.5 0.5 x -dis y -dis z dis h 25} a2 45 | 46 | { s 0.5 0.5 0.5 x dis y dis z -dis h 15} a2 47 | { s 0.5 0.5 0.5 x -dis y dis z -dis h 25} a2 48 | { s 0.5 0.5 0.5 x dis y -dis z -dis h 15} a2 49 | { s 0.5 0.5 0.5 x -dis y -dis z -dis h 25} a2 50 | 51 | } 52 | 53 | 54 | 55 | 56 | rule d w 2 { 57 | {color random }frame 58 | } 59 | 60 | rule frame { 61 | { s 0.1 1.1 0.1 x 5 z 5 } box 62 | { s 0.1 1.1 0.1 x 5 z -5 } box 63 | { s 0.1 1.1 0.1 x -5 z 5 } box 64 | { s 0.1 1.1 0.1 x -5 z -5 } box 65 | 66 | { s 1 0.1 0.1 y 5 z 5 } box 67 | { s 1 0.1 0.1 y 5 z -5 } box 68 | { s 1 0.1 0.1 y -5 z 5 } box 69 | { s 1 0.1 0.1 y -5 z -5 } box 70 | 71 | { s 0.1 0.1 1 y 5 x 5 } box 72 | { s 0.1 0.1 1 y 5 x -5 } box 73 | { s 0.1 0.1 1 y -5 x 5 } box 74 | { s 0.1 0.1 1 y -5 x -5 } box 75 | } 76 | 77 | set raytracer::samples 16 78 | 79 | // dof is depth-of-field. 80 | // Use 'Edit | Show 3D Object Information' to find the correct plane 81 | // comment the line below to disable this. 82 | //set raytracer::dof [0.2041,0.05] 83 | 84 | set raytracer::shiny::reflection 0.3 85 | set raytracer::phong [0.5,0.6,0.2] 86 | -------------------------------------------------------------------------------- /RandomCube/3drandcube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/RandomCube/3drandcube.png -------------------------------------------------------------------------------- /RandomCube/3drandcube3.es: -------------------------------------------------------------------------------- 1 | //3d rand cube 17,18 2 | #define dis 0.55 3 | set colorpool list:white,skyblue,#0044dd,#0088ee 4 | set background #fff 5 | a2 6 | 7 | rule a2 w 3 maxdepth 2 > d { 8 | 9 | { s 0.5 0.5 0.5 x dis y dis z dis h 15} a2 10 | { s 0.5 0.5 0.5 x -dis y dis z dis h 25} a2 11 | { s 0.5 0.5 0.5 x dis y -dis z dis h 15} a2 12 | { s 0.5 0.5 0.5 x -dis y -dis z dis h 25} a2 13 | 14 | { s 0.5 0.5 0.5 x dis y dis z -dis h 15} a2 15 | { s 0.5 0.5 0.5 x -dis y dis z -dis h 25} a2 16 | { s 0.5 0.5 0.5 x dis y -dis z -dis h 15} a2 17 | { s 0.5 0.5 0.5 x -dis y -dis z -dis h 25} a3 18 | 19 | } 20 | 21 | rule a3 w 3 maxdepth 2 > d { 22 | 23 | { s 0.5 0.5 0.5 x dis y dis z dis h 15} a3 24 | { s 0.5 0.5 0.5 x -dis y dis z dis h 25} a3 25 | { s 0.5 0.5 0.5 x dis y -dis z dis h 15} a3 26 | { s 0.5 0.5 0.5 x -dis y -dis z dis h 25} a3 27 | 28 | { s 0.5 0.5 0.5 x dis y dis z -dis h 15} a3 29 | { s 0.5 0.5 0.5 x -dis y dis z -dis h 25} a3 30 | { s 0.5 0.5 0.5 x dis y -dis z -dis h 15} a3 31 | { s 0.5 0.5 0.5 x -dis y -dis z -dis h 25} a4 32 | 33 | } 34 | 35 | rule a4 w 3 maxdepth 2 > d { 36 | 37 | { s 0.5 0.5 0.5 x dis y dis z dis h 15} a4 38 | { s 0.5 0.5 0.5 x -dis y dis z dis h 25} a4 39 | { s 0.5 0.5 0.5 x dis y -dis z dis h 15} a4 40 | { s 0.5 0.5 0.5 x -dis y -dis z dis h 25} a4 41 | 42 | { s 0.5 0.5 0.5 x dis y dis z -dis h 15} a4 43 | { s 0.5 0.5 0.5 x -dis y dis z -dis h 25} a4 44 | { s 0.5 0.5 0.5 x dis y -dis z -dis h 15} a4 45 | { s 0.5 0.5 0.5 x -dis y -dis z -dis h 25} a2 46 | 47 | } 48 | 49 | 50 | 51 | 52 | rule d w 2 { 53 | {color random }box 54 | } 55 | 56 | rule frame { 57 | { s 0.1 1.1 0.1 x 5 z 5 } box 58 | { s 0.1 1.1 0.1 x 5 z -5 } box 59 | { s 0.1 1.1 0.1 x -5 z 5 } box 60 | { s 0.1 1.1 0.1 x -5 z -5 } box 61 | 62 | { s 1 0.1 0.1 y 5 z 5 } box 63 | { s 1 0.1 0.1 y 5 z -5 } box 64 | { s 1 0.1 0.1 y -5 z 5 } box 65 | { s 1 0.1 0.1 y -5 z -5 } box 66 | 67 | { s 0.1 0.1 1 y 5 x 5 } box 68 | { s 0.1 0.1 1 y 5 x -5 } box 69 | { s 0.1 0.1 1 y -5 x 5 } box 70 | { s 0.1 0.1 1 y -5 x -5 } box 71 | } 72 | 73 | set raytracer::shadows false 74 | 75 | // the number of samples controls the quality 76 | // '6' means 6x6 samples per pixels, and is the default. 77 | set raytracer::samples 16 78 | 79 | // dof is depth-of-field. 80 | // Use 'Edit | Show 3D Object Information' to find the correct plane 81 | // comment the line below to disable this. 82 | set raytracer::dof [0.281102,0.05] 83 | 84 | // Set materials either globally, 85 | // or for a selected tag (e.g. 'shiny') 86 | set raytracer::shiny::reflection 0.3 87 | set raytracer::phong [0.5,0.6,0.2] 88 | -------------------------------------------------------------------------------- /RandomCube/3drandcube3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/RandomCube/3drandcube3.png -------------------------------------------------------------------------------- /RandomCube/3drandstar2.es: -------------------------------------------------------------------------------- 1 | #define dis 1 2 | #define siz 1/3 3 | set colorpool list:white,skyblue,#0044dd,#0088ee 4 | //set colorpool list:white,gray,#eee,#aaa,#888,#666 5 | set background #000 6 | a2 7 | 8 | rule a2 w 5 maxdepth 3 > d { 9 | 10 | { s siz x 0 y 0 z 0 h 15} a2 11 | 12 | { s siz x dis y dis z dis h 15} a2 13 | { s siz x dis y -dis z dis h 15} a2 14 | { s siz x -dis y dis z dis h 15} a2 15 | { s siz x -dis y -dis z dis h 15} a2 16 | 17 | { s siz x dis y dis z -dis h 15} a2 18 | { s siz x dis y -dis z -dis h 15} a2 19 | { s siz x -dis y dis z -dis h 15} a2 20 | { s siz x -dis y -dis z -dis h 15} a2 21 | 22 | } 23 | 24 | rule a2 w 3 maxdepth 1 > d { 25 | 26 | { s siz x 0 y 0 z 0 h 15} a2 27 | 28 | { s siz x dis y dis z dis h 15} a2 29 | { s siz x dis y -dis z dis h 15} a2 30 | { s siz x -dis y dis z dis h 15} a2 31 | { s siz x -dis y -dis z dis h 15} a2 32 | 33 | { s siz x dis y dis z -dis h 15} a2 34 | { s siz x dis y -dis z -dis h 15} a2 35 | { s siz x -dis y dis z -dis h 15} a2 36 | { s siz x -dis y -dis z -dis h 15} a2 37 | 38 | } 39 | rule d w 2 { 40 | {color random}box 41 | } 42 | 43 | set raytracer::shadows true 44 | set raytracer::ambient-occlusion-samples 1 45 | set raytracer::samples 16 46 | -------------------------------------------------------------------------------- /RandomCube/3drandstar2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/RandomCube/3drandstar2.png -------------------------------------------------------------------------------- /RandomCube/3drandstar3.es: -------------------------------------------------------------------------------- 1 | #define dis 1 2 | #define siz 1/3 3 | set colorpool list:white,skyblue,#0044dd,#0088ee 4 | //set colorpool list:white,gray,#eee,#aaa,#888,#666 5 | set background #000 6 | a2 7 | 8 | rule a2 w 5 maxdepth 3 > d { 9 | 10 | { s siz x 0 y 0 z 0 h 15} a2 11 | 12 | { s siz x dis y dis z dis h 15} a2 13 | { s siz x dis y -dis z dis h 15} a2 14 | { s siz x -dis y dis z dis h 15} a2 15 | { s siz x -dis y -dis z dis h 15} a2 16 | 17 | { s siz x dis y dis z -dis h 15} a2 18 | { s siz x dis y -dis z -dis h 15} a2 19 | { s siz x -dis y dis z -dis h 15} a2 20 | { s siz x -dis y -dis z -dis h 15} a2 21 | 22 | } 23 | 24 | rule a2 w 3 maxdepth 1 > d { 25 | 26 | { s siz x 0 y 0 z 0 h 15} a2 27 | 28 | { s siz x dis y dis z dis h 15} a2 29 | { s siz x dis y -dis z dis h 15} a2 30 | { s siz x -dis y dis z dis h 15} a2 31 | { s siz x -dis y -dis z dis h 15} a2 32 | 33 | { s siz x dis y dis z -dis h 15} a2 34 | { s siz x dis y -dis z -dis h 15} a2 35 | { s siz x -dis y dis z -dis h 15} a2 36 | { s siz x -dis y -dis z -dis h 15} a2 37 | 38 | } 39 | rule d w 2 { 40 | {color random}box 41 | } 42 | 43 | set raytracer::shadows true 44 | set raytracer::ambient-occlusion-samples 1 45 | set raytracer::samples 16 46 | 47 | -------------------------------------------------------------------------------- /RandomCube/3drandstar3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/RandomCube/3drandstar3.png -------------------------------------------------------------------------------- /RandomCube/randbox3d1.es: -------------------------------------------------------------------------------- 1 | //3d rand cube 17,18 2 | #define dis 0.55 3 | #define diff 45 4 | set colorpool list:white,skyblue,#0044dd,#0088ee 5 | set background #fff 6 | a2 7 | 8 | rule a2 w 3 maxdepth 2 > d { 9 | 10 | { s 0.5 0.5 0.5 x dis y dis z dis h diff} a2 11 | { s 0.5 0.5 0.5 x -dis y dis z dis h diff} a2 12 | { s 0.5 0.5 0.5 x dis y -dis z dis h diff} a2 13 | { s 0.5 0.5 0.5 x -dis y -dis z dis h diff} a2 14 | 15 | { s 0.5 0.5 0.5 x dis y dis z -dis h diff} a2 16 | { s 0.5 0.5 0.5 x -dis y dis z -dis h diff} a2 17 | { s 0.5 0.5 0.5 x dis y -dis z -dis h diff} a2 18 | { s 0.5 0.5 0.5 x -dis y -dis z -dis h diff} a3 19 | 20 | } 21 | 22 | rule a3 w 3 maxdepth 2 > d { 23 | 24 | { s 0.5 0.5 0.5 x dis y dis z dis h diff} a3 25 | { s 0.5 0.5 0.5 x -dis y dis z dis h diff} a3 26 | { s 0.5 0.5 0.5 x dis y -dis z dis h diff} a3 27 | { s 0.5 0.5 0.5 x -dis y -dis z dis h diff} a3 28 | 29 | { s 0.5 0.5 0.5 x dis y dis z -dis h diff} a3 30 | { s 0.5 0.5 0.5 x -dis y dis z -dis h diff} a3 31 | { s 0.5 0.5 0.5 x dis y -dis z -dis h diff} a3 32 | { s 0.5 0.5 0.5 x -dis y -dis z -dis h diff} a4 33 | 34 | } 35 | 36 | rule a4 w 3 maxdepth 1 > d { 37 | 38 | { s 0.5 0.5 0.5 x dis y dis z dis h diff} a4 39 | { s 0.5 0.5 0.5 x -dis y dis z dis h diff} a4 40 | { s 0.5 0.5 0.5 x dis y -dis z dis h diff} a4 41 | { s 0.5 0.5 0.5 x -dis y -dis z dis h diff} a4 42 | 43 | { s 0.5 0.5 0.5 x dis y dis z -dis h diff} a4 44 | { s 0.5 0.5 0.5 x -dis y dis z -dis h diff} a4 45 | { s 0.5 0.5 0.5 x dis y -dis z -dis h diff} a4 46 | { s 0.5 0.5 0.5 x -dis y -dis z -dis h diff} a2 47 | 48 | } 49 | 50 | 51 | 52 | 53 | rule d w 2 { 54 | {h 5}frame 55 | } 56 | 57 | rule frame { 58 | { s 0.1 1.1 0.1 x 5 z 5 } box 59 | { s 0.1 1.1 0.1 x 5 z -5 } box 60 | { s 0.1 1.1 0.1 x -5 z 5 } box 61 | { s 0.1 1.1 0.1 x -5 z -5 } box 62 | 63 | { s 1 0.1 0.1 y 5 z 5 } box 64 | { s 1 0.1 0.1 y 5 z -5 } box 65 | { s 1 0.1 0.1 y -5 z 5 } box 66 | { s 1 0.1 0.1 y -5 z -5 } box 67 | 68 | { s 0.1 0.1 1 y 5 x 5 } box 69 | { s 0.1 0.1 1 y 5 x -5 } box 70 | { s 0.1 0.1 1 y -5 x 5 } box 71 | { s 0.1 0.1 1 y -5 x -5 } box 72 | } 73 | 74 | 75 | -------------------------------------------------------------------------------- /RandomCube/randbox3d1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/RandomCube/randbox3d1.png -------------------------------------------------------------------------------- /RandomCube/randbox3d2.es: -------------------------------------------------------------------------------- 1 | //3d rand cube 17,18 2 | #define dis 0.5 3 | #define diff 30 4 | set colorpool list:white,skyblue,#0044dd,#0088ee 5 | set background #fff 6 | a2 7 | 8 | rule a2 w 3 maxdepth 6 > d { 9 | { s 0.5 0.5 1 x dis y dis h diff} a2 10 | { s 0.5 0.5 1 x -dis y dis h diff} d 11 | { s 0.5 0.5 1 x dis y -dis h diff} a2 12 | { s 0.5 0.5 1 x -dis y -dis h diff} a2 13 | } 14 | 15 | rule d w 2 { 16 | { s 1 1 0.01 h 5 } box 17 | } 18 | 19 | rule frame { 20 | { s 0.1 1.1 0.1 x 5 z 5 } box 21 | { s 0.1 1.1 0.1 x 5 z -5 } box 22 | { s 0.1 1.1 0.1 x -5 z 5 } box 23 | { s 0.1 1.1 0.1 x -5 z -5 } box 24 | 25 | { s 1 0.1 0.1 y 5 z 5 } box 26 | { s 1 0.1 0.1 y 5 z -5 } box 27 | { s 1 0.1 0.1 y -5 z 5 } box 28 | { s 1 0.1 0.1 y -5 z -5 } box 29 | 30 | { s 0.1 0.1 1 y 5 x 5 } box 31 | { s 0.1 0.1 1 y 5 x -5 } box 32 | { s 0.1 0.1 1 y -5 x 5 } box 33 | { s 0.1 0.1 1 y -5 x -5 } box 34 | } 35 | 36 | 37 | -------------------------------------------------------------------------------- /RandomCube/randbox3d2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/RandomCube/randbox3d2.png -------------------------------------------------------------------------------- /RandomCube/randbox3d4.es: -------------------------------------------------------------------------------- 1 | 2 | // Write EisenScript code here...12 3 | set background #000 4 | set colorpool list:gray,#aaa,#666,white 5 | 4 * {x 0.5 z -0.5 ry 90 } a2 6 | 1 * {z -0.5 y 0.5 rx 90} 2 * {z 1 rx 180} a2 7 | rule a2 w 3 maxdepth 3 > d { 8 | 9 | { s 0.5 0.5 0.5 x 0.5 y 0.5 h 45} a2 10 | { s 0.5 0.5 0.5 x -0.5 y 0.5 h 10} a2 11 | { s 0.5 0.5 0.5 x 0.5 y -0.5 h 60} a2 12 | { s 0.5 0.5 0.5 x -0.5 y -0.5 h 30} a2 13 | 14 | } 15 | 16 | rule a2 w 3 maxdepth 2 > d { 17 | 18 | { s 0.5 0.5 0.5 x 0.5 y 0.5 h 5} a2 19 | { s 0.5 0.5 0.5 x -0.5 y 0.5 h 15} a2 20 | { s 0.5 0.5 0.5 x 0.5 y -0.5 h 45} a2 21 | { s 0.5 0.5 0.5 x -0.5 y -0.5 h 45} a2 22 | 23 | } 24 | 25 | rule a2 w 1 maxdepth 2 > d { 26 | 27 | { s 0.5 1 1.75 x 0.5 y 0 h 5} a2 28 | { s 0.5 1 1.75 x -0.5 y 0 h 15} a2 29 | 30 | } 31 | 32 | rule a2 w 1 maxdepth 2 > d { 33 | 34 | { s 1 0.5 1.75 x 0 y 0.5 h 5} a2 35 | { s 1 0.5 1.75 x 0 y -0.5 h 15} a2 36 | 37 | } 38 | 39 | 40 | 41 | 42 | rule d w 2 { 43 | {s 1 1 0.25 color random} box 44 | } 45 | 46 | set raytracer::shadows false 47 | set raytracer::ambient-occlusion-samples 1 48 | // the number of samples controls the quality 49 | // '6' means 6x6 samples per pixels, and is the default. 50 | set raytracer::samples 16 51 | set raytracer::dof [0.307608,0.05] -------------------------------------------------------------------------------- /RandomCube/randbox3d4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/RandomCube/randbox3d4.png -------------------------------------------------------------------------------- /SierpinskiPyramid/SierpinskiPyramid.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | 3 | set background #fff 4 | 5 | cube 6 | 7 | rule cube md 3 > a2{ 8 | //1 * {s 0.5} 2 * {z 2 x 2 ry 180 } 4 * { x 2 rz 90 } cube 9 | 10 | 1 * {s 0.5} 2 * { x 1 z -1 rz 0 } cube 11 | 1 * {s 0.5} 1 * {x 1.0 y 1.0 z -2 rz 0 } cube 12 | 1 * {s 0.5} 1 * {x 1.0 y 0 z -2 rz 0 } cube 13 | } 14 | 15 | rule a2 { 16 | // Split into two halves in x direction 17 | { s 1 0.1 0.1 x 0.5 y 0 z 0} d 18 | { s 0.1 1 0.1 x 0 y 0.5 z 0} d 19 | { s 0.1 0.1 1 x 0 y 0 z 0.5} d 20 | 1 * {rz -45 y 0.75} 1 * { s 1.5 0.1 0.1} d 21 | 1 * {ry 45 z 0.75} 1 * { s 1.5 0.1 0.1} d 22 | 1 * {rx 45 y 0.75} 1 * { s 0.1 0.1 1.5} d 23 | 24 | } 25 | 26 | rule d w 2 { 27 | { } box 28 | } 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /SierpinskiPyramid/fractal4tri.es: -------------------------------------------------------------------------------- 1 | #define dis 0.5 2 | r1 3 | 4 | rule r1 md 5 > p2{ 5 | {x 0.25 y 0.25 z 0.25 s 0.5 h 20}r1 6 | {x 0 y 0 s 0.5 h 20}r1 7 | {x 0.5 y 0.5 s 0.5 h 20}r1 8 | {x 0.5 y 0 s 0.5 h 20}r1 9 | {x 0 y 0.5 s 0.5 h 20}r1 10 | 11 | } 12 | 13 | rule p2{ 14 | {}pyramid 15 | } 16 | rule pyramid { 17 | triangle[0,0,0;1,0,0;0.5,0.5,0.5] 18 | triangle[1,0,0;1,1,0;0.5,0.5,0.5] 19 | triangle[1,1,0;0,1,0;0.5,0.5,0.5] 20 | triangle[0,1,0;0,0,0;0.5,0.5,0.5] 21 | } 22 | 23 | -------------------------------------------------------------------------------- /SierpinskiPyramid/fractal4tri.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/SierpinskiPyramid/fractal4tri.png -------------------------------------------------------------------------------- /SierpinskiPyramid/fractal5tri.es: -------------------------------------------------------------------------------- 1 | set background #fff 2 | #define dis 0.5 3 | #define off 0.866 4 | r1 5 | 6 | rule r1 md 4 > p2{ 7 | {x 0.25 y 0.25 z 0.433 s 0.5 h 20}r1 8 | {x 0 y 0 s 0.5 h 20}r1 9 | {x 0.5 y 0.5 s 0.5 h 20}r1 10 | {x 0.5 y 0 s 0.5 h 20}r1 11 | {x 0 y 0.5 s 0.5 h 20}r1 12 | 13 | } 14 | 15 | rule p2{ 16 | {h 120}pyramid 17 | } 18 | rule pyramid { 19 | triangle[0,0,0;1,0,0;0.5,0.5,off] 20 | triangle[1,0,0;1,1,0;0.5,0.5,off] 21 | triangle[1,1,0;0,1,0;0.5,0.5,off] 22 | triangle[0,1,0;0,0,0;0.5,0.5,off] 23 | } 24 | 25 | set raytracer::shadows false 26 | 27 | // the number of samples controls the quality 28 | // '6' means 6x6 samples per pixels, and is the default. 29 | set raytracer::samples 10 30 | 31 | // dof is depth-of-field. 32 | // Use 'Edit | Show 3D Object Information' to find the correct plane 33 | // comment the line below to disable this. 34 | //set raytracer::dof [0.23,0.07] 35 | 36 | // Set materials either globally, 37 | // or for a selected tag (e.g. 'shiny') 38 | set raytracer::shiny::reflection 0.3 39 | set raytracer::phong [0.5,0.6,0.2] 40 | 41 | -------------------------------------------------------------------------------- /SierpinskiPyramid/fractal5tri.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/SierpinskiPyramid/fractal5tri.png -------------------------------------------------------------------------------- /SierpinskiPyramid/fractal6tri.es: -------------------------------------------------------------------------------- 1 | set background #fff 2 | #define dis 1 3 | #define off 0.866 4 | 1 * {z -0.05 s 50 50 0.1 color #e99}box 5 | r1 6 | 7 | rule r1 md 6{ 8 | {x dis y dis s 0.5 h 72}r1 9 | {x dis y 0 s 0.5 h 72}r1 10 | {x 0 y dis s 0.5 h 72}r1 11 | {x 0 y 0 s 0.5 h 72}r1 12 | {x 0.5 y 0.5 z off s 0.5 h 72}r1 13 | {x 1 y 1 z 0.5 }box 14 | } 15 | 16 | rule p2{ 17 | {h 0}pyramid 18 | } 19 | rule pyramid { 20 | triangle[0.5,0.5,0 ;0,0,off;1,0,off] 21 | triangle[0.5,0.5,0 ;1,0,off;1,1,off] 22 | triangle[0.5,0.5,0 ;1,1,off;0,1,off] 23 | triangle[0.5,0.5,0 ;0,1,off;0,0,off] 24 | 25 | triangle[0,0,off;1,0,off;1,1,off] 26 | triangle[1,1,off;0,1,off;0,0,off] 27 | 28 | } 29 | 30 | set raytracer::shadows false 31 | 32 | // the number of samples controls the quality 33 | // '6' means 6x6 samples per pixels, and is the default. 34 | set raytracer::samples 16 35 | 36 | // dof is depth-of-field. 37 | // Use 'Edit | Show 3D Object Information' to find the correct plane 38 | // comment the line below to disable this. 39 | //set raytracer::dof [0.23,0.07] 40 | 41 | // Set materials either globally, 42 | // or for a selected tag (e.g. 'shiny') 43 | set raytracer::shiny::reflection 0.3 44 | set raytracer::phong [0.5,0.6,0.2] 45 | 46 | 47 | -------------------------------------------------------------------------------- /SierpinskiPyramid/fractal6tri.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/SierpinskiPyramid/fractal6tri.png -------------------------------------------------------------------------------- /SierpinskiPyramid/invertedsierpinkipyramid.es: -------------------------------------------------------------------------------- 1 | //Inverted Sierpinki Pyramid 2 | set background #fff 3 | #define dis 0.5 4 | #define off 0.866 5 | #define gap 1 6 | 7 | r1 8 | 9 | rule r1 md 5 { 10 | 11 | { x 0 z 0.433 s 0.5 h 40 } r1 12 | 13 | { x 0.25 y 0.25 s 0.5 h 40 } r1 14 | { x -0.25 y -0.25 s 0.5 h 40 } r1 15 | { x -0.25 y 0.25 s 0.5 h 40 } r1 16 | { x 0.25 y -0.25 s 0.5 h 40 } r1 17 | { z 0.25 } p2 18 | 19 | } 20 | 21 | rule p2 { 22 | 23 | { s 0.5 } pyramid2 24 | 25 | } 26 | 27 | rule pyramid2 { 28 | 29 | triangle[0.5,0.5,0 ;0,0,off;1,0,off] 30 | triangle[0.5,0.5,0 ;1,0,off;1,1,off] 31 | triangle[0.5,0.5,0 ;1,1,off;0,1,off] 32 | triangle[0.5,0.5,0 ;0,1,off;0,0,off] 33 | 34 | triangle[0,0,off;1,0,off;1,1,off] 35 | triangle[1,1,off;0,1,off;0,0,off] 36 | 37 | } 38 | 39 | -------------------------------------------------------------------------------- /SierpinskiPyramid/invertedsierpinkipyramid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/SierpinskiPyramid/invertedsierpinkipyramid.png -------------------------------------------------------------------------------- /SierpinskiPyramid/sierpinkipyramid.es: -------------------------------------------------------------------------------- 1 | //Sierpinki Pyramid 2 | set background #fff 3 | #define dis 0.5 4 | #define off 0.866 5 | #define gap 1 6 | 7 | r1 8 | 9 | rule r1 md 4 > p1 { 10 | 11 | { x 0 z 0.433 s 0.5 h 40 } r1 12 | 13 | { x 0.25 y 0.25 s 0.5 h 40 } r1 14 | { x -0.25 y -0.25 s 0.5 h 40 } r1 15 | { x -0.25 y 0.25 s 0.5 h 40 } r1 16 | { x 0.25 y -0.25 s 0.5 h 40 } r1 17 | 18 | } 19 | 20 | rule p1 { 21 | { z 0.5 h 50 } pyramid1 22 | } 23 | rule pyramid1 { 24 | triangle[0,0,0;1,0,0;0.5,0.5,off] 25 | triangle[1,0,0;1,1,0;0.5,0.5,off] 26 | triangle[1,1,0;0,1,0;0.5,0.5,off] 27 | triangle[0,1,0;0,0,0;0.5,0.5,off] 28 | } -------------------------------------------------------------------------------- /SierpinskiPyramid/sierpinski1.es: -------------------------------------------------------------------------------- 1 | //sierpinski 2 | #define size 1 3 | { s 1 } sierpinski // scales our starting size 4 | 5 | sierpinski 6 | 3 * { rz 90} sierpinski 7 | 8 | rule sierpinski maxdepth 5 > spongeunit { 9 | { s 0.5 } sierpinski 10 | { s 0.5 x size } sierpinski 11 | { s 0.5 y size } sierpinski 12 | { s 0.5 z size } sierpinski 13 | } 14 | 15 | rule spongeunit { { s 1} box} -------------------------------------------------------------------------------- /SierpinskiPyramid/sierpinskipyramidcube.es: -------------------------------------------------------------------------------- 1 | //Sierpinski Pyramid Cube 2 | #define dis 1 3 | #define off 0.866 4 | set background #fff 5 | 6 | 1 * {z -0.1 s 50 50 0.1 color #ad6 } box 7 | 2 * {x 2 z 2 ry 180 } 4 * {y 2 rx 90 } r1 8 | 9 | rule r1 md 3 > p2 { 10 | {s 0.5 x 0 y 0 } r1 11 | { s 0.5 x 1 } r1 12 | { s 0.5 x 0 y 1 z 0 } r1 13 | { s 0.5 x 0 y 0 z 1 } r1 14 | } 15 | 16 | rule r1 md 1 > p2 { 17 | {s 0.5 x 0 y 0 } r1 18 | { s 0.5 x 1 } r1 19 | { s 0.5 x 0 y 1 z 0 } r1 20 | { s 0.5 x 0 y 0 z 1 } r1 21 | } 22 | 23 | rule r1 md 1 > p2 { 24 | {s 0.5 x 0 y 0 }r1 25 | { s 0.5 x 1 }r1 26 | { s 0.5 x 0 y 1 z 0 }r1 27 | { s 0.5 x 0 y 0 z 1 }r1 28 | } 29 | 30 | rule p2{ 31 | //{x 0.5 y 0.5 z 0.5 color #b9c}box 32 | { x 0.5 y 0.5 z 0.5 color #b9c } pyramid 33 | } 34 | rule pyramid { 35 | 36 | triangle[0,0,0;0,1,0;1,0,0] 37 | 38 | triangle[0,0,0;0,1,0;0,0,1] 39 | 40 | triangle[0,0,0;1,0,0;0,0,1] 41 | 42 | triangle[1,0,0;0,1,0;0,0,1] 43 | 44 | } -------------------------------------------------------------------------------- /SierpinskiPyramid/sierpinskitetra.es: -------------------------------------------------------------------------------- 1 | //tetrahedron 2 | set background #fff 3 | //set colorpool list:white,#ee0,#e0e,#0ee 4 | set colorpool list:white,#e80,#08e,#8e0 5 | #define dis 1 6 | #define const 0.2886 7 | #define off 0.866 8 | //1 * {z -0.05 s 50 50 0.1 color #e99}box 9 | r1 10 | 11 | rule r1 md 5 > p2{ 12 | {x 0 y 0 s 0.5 h 72}r1 13 | {x 0.5 y 0 s 0.5 h 72}r1 14 | {x 0.25 y 0.433 s 0.5 h 72}r1 15 | {x 0.25 y 0.1443 z 0.433 s 0.5 h 72}r1 16 | } 17 | 18 | rule p2{ 19 | {color random}pyramid 20 | } 21 | rule pyramid { 22 | 23 | triangle[0,0,0;1,0,0;0.5,off,0] 24 | triangle[0,0,0;1,0,0;0.5,const,off] 25 | triangle[1,0,0;0.5,off,0;0.5,const,off] 26 | triangle[0,0,0;0.5,off,0;0.5,const,off] 27 | } 28 | 29 | -------------------------------------------------------------------------------- /SierpinskiPyramid/squaresq2.es: -------------------------------------------------------------------------------- 1 | 2 | set colorpool list:white,#e80,#08e,#8e0,#80e 3 | set background #fff 4 | cube 5 | 1 * {z -0.1 s 50 50 0.1 color #eee}box 6 | 7 | 8 | rule cube{ 9 | 4 * {z 0.5125 y 1.5 rx 90} 4 * {x 1 rz 90} a2 10 | 1 * {z 1.5 x -0.5 ry 90 } 2 * {x 1 z 2 ry 180} 4 * {x 1 rz 90} a2 11 | } 12 | 13 | rule a2 w 5 maxdepth 5 > d { 14 | { s 0.5 0.5 1.05 x -0.5 y 0.5} a2 15 | { s 0.5 0.5 1.05 x 0.5 y -0.5} a2 16 | { s 0.5 0.5 1.05 x -0.5 y -0.5 blend red 0.5} a2 17 | 18 | } 19 | 20 | rule d w 2 { 21 | { s 1 1 0.02 } box 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /SierpinskiPyramid/squaresq2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/SierpinskiPyramid/squaresq2.png -------------------------------------------------------------------------------- /SimpleStructures/Structure1.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | // Write EisenScript code here... 3 | set maxdepth 100 4 | #define offset 9.55 5 | #define gap 4.775 6 | #define shrink s 1 7 | 1 * { y 0} 5 * { z 9.75 } 5 * {x 9.75 s 1 color #ddd} R 8 | 1 * { y 10 z 9.75 x 9.75} 3 * {z 9.75 } 3 * {x 9.75 s 1 color #ddd} R 9 | 1 * { y 20 z 19.5 x 19.5} 1 * {z 9.75 } 1 * {x 9.75 s 1 color #ddd} R 10 | 11 | rule R { pillar 12 | R1 13 | {x offset}pillar 14 | {ry -90}R1 15 | {z offset}pillar 16 | {x offset ry -90}R1 17 | {x offset z offset}pillar 18 | {z offset x offset ry 180}R1 19 | roof 20 | } 21 | 22 | rule R1 md 60 { 23 | { y 0.25 rz -3 shrink} R1 dbox 24 | } 25 | 26 | rule pillar md 5 > star{ 27 | { y -1}pillar box 28 | } 29 | 30 | rule star { 31 | {y 0.5 s 1.5 0.5 1.5} box 32 | {y 0.5 ry 45 s 1.5 0.5 1.5} box 33 | } 34 | 35 | rule roof { 36 | {x gap z gap y 5.05 s 10.5 0.05 10.5} box 37 | } 38 | 39 | rule dbox { 40 | { s 0.2 1 1} box 41 | } -------------------------------------------------------------------------------- /SimpleStructures/Structure1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/SimpleStructures/Structure1.png -------------------------------------------------------------------------------- /SimpleStructures/Swastik.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | // Write EisenScript code here... 3 | 4 | #define shrink s 0.999 5 | 6 | set maxdepth 120 7 | set background #fff 8 | 9 | 4 * {ry 90 color #f50 } hbox 10 | 4 * {rx 3 ry 90} ball 11 | ball2 12 | rule hbox { r} 13 | rule r { forwardx1} 14 | //rule r { forwardy } 15 | //rule r { forwardz } 16 | //rule r { turn3 } 17 | //rule r { turn2 } 18 | //rule r { turn4 } 19 | //rule r { turn3 } 20 | 21 | rule forwardx1 md 30 > turn4 { 22 | dbox 23 | { x 0.5 shrink } forwardx1 24 | } 25 | 26 | rule forwardx2 md 30 > turn3 { 27 | dbox 28 | { x 0.5 shrink } forwardx2 29 | } 30 | 31 | rule forwardx3 md 30 > turn3 { 32 | dbox 33 | { x 0.5 shrink } forwardx3 34 | } 35 | 36 | rule forwardx4 md 30 > turn4 { 37 | dbox 38 | { x 0.5 shrink } forwardx4 39 | } 40 | 41 | 42 | 43 | 44 | 45 | rule turn md 55 > forwardx1 { 46 | dbox 47 | { rz 1.5 x 0.5 shrink } turn 48 | } 49 | 50 | rule turn2 md 55 > forwardx2 { 51 | dbox 52 | { rz -1.5 x 0.5 shrink } turn2 53 | } 54 | 55 | rule turn3 md 55 > forwardx3 { 56 | dbox 57 | { ry 1.5 x 0.5 shrink } turn3 58 | } 59 | 60 | rule turn4 md 55 > forwardx4 { 61 | dbox 62 | { ry -1.5 x 0.5 shrink } turn4 63 | } 64 | 65 | 66 | rule dbox { 67 | { ry 15 s 0.2 4 1 } box 68 | } 69 | 70 | rule ball { 71 | {y 5 x 13 z 13} sphere 72 | } 73 | 74 | rule ball2 { 75 | {y 50} sphere 76 | } 77 | // Write EisenScript code here... 78 | -------------------------------------------------------------------------------- /SimpleStructures/Swastik.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/SimpleStructures/Swastik.png -------------------------------------------------------------------------------- /SimpleStructures/forarm.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | // Write EisenScript code here... 3 | set maxdepth 7 4 | 1 * {z 24.5 y 2 color #f00} R2 5 | 1 * {z 16.5 y -23 color #fff} R2 6 | 1 * {s 2 } 20 * {y 4 rx 18 color #aa6} R1 7 | 8 | 9 | rule R1 { 10 | {rx -90 ry 0 s 2 h 10} box 11 | } 12 | 13 | rule R2{ 14 | {s 3}sphere 15 | } -------------------------------------------------------------------------------- /SimpleStructures/forbunny.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | set maxdepth 7 3 | 1 * {s 2} 20 * {x 0.01 ry 18 h 18} R1 4 | 5 | rule R1 { 6 | {x 0 ry 0 s 2 h 10} box 7 | } -------------------------------------------------------------------------------- /SimpleStructures/simple1.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | 3 | r1 4 | 5 | rule r1 md 10{ 6 | {x 5 ry 36}r1 7 | square 8 | } 9 | 10 | rule square{ 11 | {rz 45 s 6 1.75 10 }box 12 | } -------------------------------------------------------------------------------- /SimpleStructures/simple1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/SimpleStructures/simple1.png -------------------------------------------------------------------------------- /SimpleStructures/simple2.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | 3 | r1 4 | 5 | rule r1 md 8{ 6 | {x 5 }r1 7 | square 8 | } 9 | 10 | rule square{ 11 | {ry 45 s 1 10 5 }box 12 | } -------------------------------------------------------------------------------- /SimpleStructures/simple2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/SimpleStructures/simple2.png -------------------------------------------------------------------------------- /SimpleStructures/spiral1.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | set maxdepth 7 3 | 17 * {rx 15 rz 15} 36 * {x 1.5 y 1.5 rz 5 h 10} R1 4 | 5 | rule R1 { 6 | {x 0 y 0 s 2 h 10} sphere 7 | } -------------------------------------------------------------------------------- /SimpleStructures/spiral1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/SimpleStructures/spiral1.png -------------------------------------------------------------------------------- /SimpleStructures/spiral2.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | set maxdepth 7 3 | 1 * {s 1 1 1} 40 * {y 1 rz 9 h 0} 15 * {x 1.75 rz 7.5 h -15 s 1.15 1.15 1.1} R1 4 | 5 | rule R1 { 6 | { x 1 y 0 rz 90 h 10} box 7 | } 8 | 9 | -------------------------------------------------------------------------------- /SimpleStructures/spiral2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/SimpleStructures/spiral2.png -------------------------------------------------------------------------------- /SimpleStructures/structure3.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | 1 * { s 0.5 x 60 y 30.1} 5 * {x 57.65 color #c30} roof 3 | 1 * { s 0.5} 5 * {x 57.65 color #c30} arc 4 | side1 5 | 25 * {x -60} side1 6 | { x 214.75}side1 7 | 8 | 9 | 10 | rule arc md 62{ 11 | { y 1.5 rz -3} arc dbox 12 | } 13 | 14 | rule roof md 22{ 15 | { x -3} roof dbox2 16 | } 17 | rule dbox{ 18 | { s 0.5 5 30 }box 19 | } 20 | 21 | rule dbox2{ 22 | {s 5 2 30}box 23 | } 24 | 25 | rule side1{ 26 | {y 7 x -6.25 s 70 17 30 color #aaa}box 27 | } 28 | 29 | //lamp 30 | 1 * { y 15 z -7 x -150} 7 * {x 50 color #730}lamp 31 | 1 * { y 15 z 7 x 225 ry 180} 10 * {x 50 color #730}lamp 32 | 33 | 34 | rule lamp md 15 > lampside{ 35 | { y 0.5 s 0.999}lamp box 36 | } 37 | 38 | rule lampside md 6 > lampdown{ 39 | {z 0.5 s 0.999}lampside box 40 | } 41 | 42 | rule lampdown md 5 > reflector{ 43 | {y -0.25 s 0.99}lampdown box 44 | } 45 | 46 | rule reflector { 47 | 1 * { h 50 s 1.5} 20 * { ry 18 color #993}leaf1 48 | { s 1.5 y -0.1 color #fff} sphere 49 | } 50 | 51 | rule leaf1{ 52 | { x 0.75 rz -25 s 1 0.05 0.5} box 53 | } 54 | 55 | //road and boundary 56 | 1 * { y 16 z -7 s 485 1 1.2 color #630} box 57 | 1 * { y 16 z 7 s 485 1 1.2 color #630} box 58 | 1 * { y 15.5 z 0 s 485 0.5 14 color #222} box 59 | 60 | //ground an river 61 | 1 * {x -220 y -1 s 500 0.3 1000 color #960} box 62 | 1 * {x 100 y -2 s 200 0.1 1000 color #05f} box 63 | 1 * {x 270 y -1 s 200 0.3 1000 color #960} box -------------------------------------------------------------------------------- /SimpleStructures/structure3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/SimpleStructures/structure3.png -------------------------------------------------------------------------------- /SimpleStructures/swirl.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | //swirl 3 | 2 * {ry 180 ry 0} 200 * {y 0.25 ry 5 h 2} 25 * {x 0.15 ry 5} a1 4 | 5 | rule a1{ 6 | {s 0.2 0.2 0.05}box 7 | } -------------------------------------------------------------------------------- /SimpleStructures/swirl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/SimpleStructures/swirl.png -------------------------------------------------------------------------------- /SimpleStructures/tile1.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | 4 * {z 3.83 color #0f4} 4 * { x 3.83 } 8 * {ry 45}prim1 3 | 4 | rule prim1{ 5 | { x 1.707 s 1 0.2 1}box 6 | } 7 | -------------------------------------------------------------------------------- /SimpleStructures/tile1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/SimpleStructures/tile1.png -------------------------------------------------------------------------------- /SimpleStructures/tile2.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | 3 * {z 2.83 color #0f4} 3 * { x 2.83} 3 * {ry 45}prim1 3 | //1 * {s 0.5 ry 22.5} 8 * {ry 45}prim2 4 | 5 | rule prim2{ 6 | {ry 45 x 1.414 s 2 0.2 2}box 7 | 8 | } 9 | 10 | rule prim1{ 11 | {ry 45 x 0 s 2 0.2 2}box 12 | } 13 | -------------------------------------------------------------------------------- /SimpleStructures/tile2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/SimpleStructures/tile2.png -------------------------------------------------------------------------------- /Tree/3dtree.es: -------------------------------------------------------------------------------- 1 | //3D Tree 2 | set maxdepth 500 3 | 4 | 1 * { ry 90 h 30} spiral 5 | 6 | rule spiral w 100 md 400 > R2{ 7 | { y 0.2 rx 1 ry 1 s 0.993 }spiral 8 | box 9 | } 10 | 11 | rule spiral w 1 { 12 | spiral 13 | { ry 180 h 3 } spiral 14 | } 15 | 16 | rule R2{ 17 | { s 2.5 h 70 } sphere 18 | { y -1 s 3 0.2 2 h 120 } R3 19 | } 20 | 21 | rule R3 md 35 { 22 | box 23 | { rx 5 ry 15 } R3 24 | } -------------------------------------------------------------------------------- /Tree/3dtree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/3dtree.png -------------------------------------------------------------------------------- /Tree/3dtree2.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | set maxdepth 400 3 | 4 | 4 * { ry 90 h 100 sat 0.85} spiral 5 | 6 | rule spiral w 100 md 350 > Rin{ 7 | box 8 | { y 0.2 rx 1 ry 1 s 0.993 }spiral 9 | } 10 | 11 | rule spiral w 1 { 12 | spiral 13 | { ry 180 h 3 } spiral 14 | } 15 | 16 | rule Rin md 8 > leaf{ 17 | box 18 | { y 0.5 rx 1 ry 1 s 0.993 }Rin 19 | } 20 | 21 | rule leaf md 30 > R2 { 22 | box 23 | { ry 10 x 0.5 z 0.5 y 0.5 h -3 s 1 1 0.95} leaf 24 | } 25 | 26 | rule R2{ 27 | {s 15 h 170 sat 1} sphere 28 | } 29 | 30 | -------------------------------------------------------------------------------- /Tree/3dtree2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/3dtree2.png -------------------------------------------------------------------------------- /Tree/3dtree3.es: -------------------------------------------------------------------------------- 1 | //3D Tree 3 2 | set maxdepth 400 3 | 4 | 1 * {h 100 sat 0.85} 4 * { ry 90 } spiral 5 | 6 | rule spiral w 100 md 350 > Rin{ 7 | box 8 | { y 0.2 rx 0.5 s 0.993 }spiral 9 | } 10 | 11 | rule spiral w 1 { 12 | spiral 13 | { ry 180 rz 90 h 3 } spiral 14 | } 15 | 16 | 17 | rule Rin md 8 > leaf { 18 | box 19 | { y 0.5 rx 1 ry 1 s 0.993 }Rin 20 | } 21 | 22 | rule leaf md 30 > R2 { 23 | box 24 | { ry 10 x 0.5 z 0.5 y 0.5 h -3 s 1 1 0.95} leaf 25 | } 26 | 27 | rule R2{ 28 | {s 15 h 170 sat 1} sphere 29 | } -------------------------------------------------------------------------------- /Tree/3dtree3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/3dtree3.png -------------------------------------------------------------------------------- /Tree/Hfractal.es: -------------------------------------------------------------------------------- 1 | //h Fractal 2 | #define displace 0.25 3 | 4 | set maxdepth 200 5 | set background white 6 | 7 | R1 8 | 9 | rule R1 maxdepth 9 { 10 | { y 0.5 x displace rz -90 s 0.707 h 40 }R1 11 | { y 0.5 x -displace rz 90 s 0.707 h 40 }R1 12 | d 13 | 14 | } 15 | 16 | rule d{ 17 | {s 0.1 1 0.1 h 40}box 18 | } 19 | 20 | -------------------------------------------------------------------------------- /Tree/Hfractal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/Hfractal.png -------------------------------------------------------------------------------- /Tree/Hfractal2.es: -------------------------------------------------------------------------------- 1 | //H Fractal 2 | #define displace 0.25 3 | 1 * {z -0.1 s 50 50 0.1 color #bbb}box 4 | set maxdepth 12 5 | set background white 6 | 7 | 2 * {y -0.75 rz 180}R1 8 | 9 | rule R1 maxdepth 7 { 10 | { y 0.5 x displace rz -90 s 0.707 h 40 }R1 11 | { y 0.5 x -displace rz 90 s 0.707 h 40 }R1 12 | d 13 | } 14 | 15 | rule d{ 16 | {s 0.1 1 0.1 h 40}box 17 | } 18 | 19 | 20 | -------------------------------------------------------------------------------- /Tree/Hfractal2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/Hfractal2.png -------------------------------------------------------------------------------- /Tree/Hfractal3d.es: -------------------------------------------------------------------------------- 1 | //h Fractal 3d 2 | #define displace 0.25 3 | 4 | set maxdepth 200 5 | set background white 6 | 7 | R1 8 | 9 | rule R1 maxdepth 5 > d{ 10 | { y 0.5 x displace rz -90 s 0.707 h 40 }R1 11 | { y 0.5 x -displace rz 90 s 0.707 h 40 }R1 12 | 13 | { y 0.5 x 0 z displace rx 90 s 0.707 h 40 }R1 14 | { y 0.5 x 0 z -displace rx -90 s 0.707 h 40 }R1 15 | {s 0.1 1 0.1 h 40}box 16 | } 17 | 18 | rule d{ 19 | {s 0.1 1 0.1 h 40}box 20 | {y 0.5 s 0.3 color #ee3}sphere 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /Tree/Hfractal3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/Hfractal3d.png -------------------------------------------------------------------------------- /Tree/flowertree.es: -------------------------------------------------------------------------------- 1 | //pytree 3d 2 | #define displace 0.25 3 | 4 | 5 | set maxdepth 200 6 | set background white 7 | //1 * {y -0.5 s 150 0.1 150 color #bbb}box 8 | R1 9 | 10 | rule R1 maxdepth 5 > R2{ 11 | { y 0.75 x displace rz -45 s 0.707 h 40 }R1 12 | { y 0.75 x -displace rz 45 s 0.707 h 40 }R1 13 | 14 | { y 0.75 z displace rx 45 s 0.707 h 40 }R1 15 | { y 0.75 z -displace rx -45 s 0.707 h 40 }R1 16 | 17 | 18 | {s 0.1 1 0.1 color #4e7} box 19 | } 20 | 21 | rule R2{ 22 | {s 0.1 1 0.1 color #4e7} box 23 | //{y 0.5 s 0.5 color #e80}sphere 24 | {y 0.5 s 0.5}leaf 25 | } 26 | 27 | rule leaf { 28 | 1 * { h 210 y 0.02 } 8 * { ry 45 }leaf1 29 | ball 30 | } 31 | rule leaf1{ 32 | { x 0.5 rz 25 s 1 0.05 0.5 } box 33 | } 34 | 35 | rule ball{ 36 | { s 0.5 sat 1 h 90 } sphere 37 | } 38 | 39 | -------------------------------------------------------------------------------- /Tree/flowertree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/flowertree.png -------------------------------------------------------------------------------- /Tree/fractaltree1.es: -------------------------------------------------------------------------------- 1 | //fractaltree1 2 | #define gap 0.5 3 | set maxdepth 200 4 | set background white 5 | set colorpool list:white,#f00,#f80,#ff0 6 | 7 | //1 * { s 0.01 100 100 color #eee } box 8 | tree 9 | 10 | rule tree md 6 { 11 | 12 | { x gap s 0.49 } tree 13 | { x gap y 0 s 0.49 rz 90 } tree 14 | { x gap y 0 s 0.49 rz -90 } tree 15 | 16 | { x gap y 0 s 0.49 ry -90 } tree 17 | { x gap y 0 s 0.49 ry 90 } tree 18 | //{ x -0.5 y 0 s 0.49 rz 180} tree 19 | plus 20 | } 21 | 22 | rule plus { 23 | { x 0.25 s 0.25 1 1 rz 90 } d 24 | } 25 | 26 | rule d { 27 | { s 0.05 2 0.05 color random } box 28 | } 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Tree/fractaltree1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/fractaltree1.png -------------------------------------------------------------------------------- /Tree/fractaltree2.es: -------------------------------------------------------------------------------- 1 | //fractaltree1 2 | #define gap 0.5 3 | #define scaf 0.6 4 | //scale factor 5 | #define rot 45 6 | set maxdepth 200 7 | set background white 8 | set colorpool list:white,#0f5,#8f0,#091 9 | 10 | //1 * { s 0.01 100 100 color #eee } box 11 | tree 12 | 13 | rule tree md 5 { 14 | 15 | { x gap s scaf } tree 16 | { x gap y 0 s scaf rz rot } tree 17 | { x gap y 0 s scaf rz -rot } tree 18 | 19 | { x gap y 0 s scaf ry -rot } tree 20 | { x gap y 0 s scaf ry rot } tree 21 | //{ x -0.5 y 0 s scaf rz 180} tree 22 | plus 23 | } 24 | 25 | rule plus { 26 | { x 0.25 s 0.25 1 1 rz 90 } d 27 | } 28 | 29 | rule d { 30 | { s 0.05 2 0.05 color random } box 31 | } 32 | 33 | -------------------------------------------------------------------------------- /Tree/fractaltree2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/fractaltree2.png -------------------------------------------------------------------------------- /Tree/h60tree.es: -------------------------------------------------------------------------------- 1 | //h 60 tree 2 | #define displace 0.3 3 | #define up 0.6 4 | set maxdepth 200 5 | set background white 6 | 7 | R1 8 | 9 | rule R1 maxdepth 8 { 10 | { y up x displace rz -60 s 0.6667 h 40 }R1 d 11 | { y up x -displace rz 60 s 0.6667 h 40 }R1 d 12 | } 13 | 14 | rule d{ 15 | {s 0.1 1 0.1 h 40}box 16 | } 17 | 18 | 19 | -------------------------------------------------------------------------------- /Tree/h60tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/h60tree.png -------------------------------------------------------------------------------- /Tree/spiraltree1.es: -------------------------------------------------------------------------------- 1 | //Spiral Tree 1 2 | set maxdepth 520 3 | 4 | { h 30 sat 0.7 } stem 5 | 6 | rule stem md 20 { 7 | box 8 | { y -1 } stem 9 | } 10 | 11 | { h 30 sat 0.7 } spiral 12 | { ry 180 h 30 sat 0.7 } spiral 13 | 14 | rule spiral w 1 { 15 | spiral 16 | { ry 180 h 3 } spiral 17 | } 18 | 19 | rule spiral w 100 md 500 > leaf{ 20 | box 21 | { y 0.4 rz 1 s 0.995 } spiral 22 | } 23 | 24 | rule leaf { 25 | { s 10.5 10.5 1 rz 45 h 60 } box 26 | } 27 | -------------------------------------------------------------------------------- /Tree/spiraltree1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/spiraltree1.png -------------------------------------------------------------------------------- /Tree/spiraltree1modified.es: -------------------------------------------------------------------------------- 1 | //Spiral Tree 2 , use seed 11,6,470,37,43 2 | set colorpool list:red,#f0f,#80f,#f08 3 | set maxdepth 520 4 | 5 | { h 100 sat 0.8 } stem 6 | 7 | rule stem md 20 { 8 | {color #fff}box 9 | { y -1 } stem 10 | } 11 | 12 | { h 100 sat 0.8 } spiral 13 | { ry 180 h 100 sat 0.8 } spiral 14 | 15 | 16 | rule spiral w 1 { 17 | spiral 18 | { ry 180 h 3 } spiral 19 | } 20 | 21 | rule spiral w 50 md 100 > leaf { 22 | { y 0.4 rz 3 s 0.993 } spiral 23 | {color #fff } box 24 | } 25 | 26 | 27 | rule spiral w 100 md 300 > leaf { 28 | { y 0.4 rz 3 s 0.995 } spiral 29 | {color #fff } box 30 | } 31 | 32 | rule leaf { 33 | { s 3.5 3.5 0.75 rz 30 color random } box 34 | } -------------------------------------------------------------------------------- /Tree/spiraltree1modified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/spiraltree1modified.png -------------------------------------------------------------------------------- /Tree/spiraltree2.es: -------------------------------------------------------------------------------- 1 | //Spiral Tree 2 , use seed 11,6 2 | set maxdepth 520 3 | 4 | { h 100 sat 0.8 } stem 5 | 6 | rule stem md 20 { 7 | box 8 | { y -1 } stem 9 | } 10 | 11 | { h 100 sat 0.8 } spiral 12 | { ry 180 h 100 sat 0.8 } spiral 13 | 14 | rule spiral w 1 { 15 | spiral 16 | { ry 180 h 3 } spiral 17 | } 18 | 19 | rule spiral w 100 md 400 > leaf { 20 | { y 0.4 rz 2.5 s 0.995 } spiral 21 | box 22 | } 23 | 24 | rule leaf { 25 | { s 7.5 7.5 1 rz 45 h 60 } box 26 | } 27 | -------------------------------------------------------------------------------- /Tree/spiraltree2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/spiraltree2.png -------------------------------------------------------------------------------- /Tree/spiraltree3.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | set maxdepth 560 3 | 20 * { y -1} box 4 | 5 | 30 * { x 0 } R1 6 | 30 * { ry 180 } R1 7 | 8 | rule R1 w 100 md 100 > R2{ 9 | box 10 | { y 0.9 ry 3 rz 5 rx 0.05 s 0.985 }R1 11 | 12 | } 13 | 14 | rule R1 w 1 maxdepth 20{ 15 | { ry 180 }R1 16 | } 17 | 18 | rule R2{ 19 | { s 2 h 70} sphere 20 | {y -1 s 3 0.2 2 h 120}R3 21 | } 22 | 23 | rule R3 md 35{ 24 | box 25 | {rx 5 ry 15 } R3 26 | } -------------------------------------------------------------------------------- /Tree/spiraltree3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/spiraltree3.png -------------------------------------------------------------------------------- /Tree/spiraltree4.es: -------------------------------------------------------------------------------- 1 | set maxdepth 370 2 | 3 | 10 * { y -1 color #069} box 4 | 5 | 6 | 4 * { ry 90 color #069} spiral 7 | 8 | rule spiral w 100 md 300 > spiral2{ 9 | box 10 | { y 0.2 rx 2.5 ry 1.5 s 0.995 color #069} spiral 11 | } 12 | 13 | rule spiral2 md 50 > leaf{ 14 | box 15 | { y 0.2 rx -2.5 s 0.995 color #069} spiral2 16 | } 17 | 18 | rule leaf { 19 | 1 * { h 50 y 0.5 s 2.25} 8 * { ry 45 color #6f0}leaf1 20 | ball 21 | } 22 | rule leaf1{ 23 | { x 0.75 rz 25 s 1 0.05 0.5} box 24 | } 25 | 26 | rule ball{ 27 | { s 1.75 y 0.35 color #f6c} sphere 28 | } 29 | 30 | rule spiral w 1 { 31 | spiral 32 | { ry 90 rx 90 h 3 color #069} spiral 33 | } 34 | -------------------------------------------------------------------------------- /Tree/spiraltree4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/spiraltree4.png -------------------------------------------------------------------------------- /Tree/tree10.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | #define siz 0.979 3 | set colorpool list:#66f,#6cf,#3cf,#0cf,#39f 4 | set maxdepth 200 5 | 4 * { y -1 color #ffee11} frame 6 | 7 | 4 * { ry 90 color #ffee11} spiral 8 | 9 | rule spiral w 100 md 30 > R2{ 10 | frame 11 | { y 1 rx 3.5 ry 1.5 rz 0 s 0.995 color #ffee11}spiral 12 | } 13 | 14 | rule spiral w 1 { 15 | spiral 16 | { ry 180 color #ffee11} spiral 17 | } 18 | 19 | rule R2{ 20 | //{ s 2.5 h 70} sphere 21 | {color #ffee11}leaf 22 | 23 | } 24 | 25 | 26 | rule leaf { 27 | pstem 28 | pstem 29 | pstem 30 | pstem 31 | pstem 32 | pstem 33 | } 34 | 35 | 36 | rule pettle{ 37 | 1 * {y 0.25 s 2.25 color random} 10 * { ry 36 } leaf1 38 | } 39 | 40 | rule leaf1{ 41 | { x 0.75 rz 25 s 1 0.05 0.5} box 42 | } 43 | 44 | rule ball{ 45 | { s 1.5 y 0.1 color #fdd} sphere 46 | pettle 47 | } 48 | 49 | rule pstem{pstem1} 50 | rule pstem{pstem2} 51 | rule pstem{pstem3} 52 | rule pstem{pstem4} 53 | rule pstem{pstem5} 54 | rule pstem{pstem6} 55 | rule pstem{pstem7} 56 | rule pstem{pstem8} 57 | rule pstem{pstem9} 58 | 59 | rule pstem1 md 30 > ball{ 60 | {y 0.5 rx 3 rz 4 ry 3 s siz color #ffee11}pstem1 61 | frame 62 | } 63 | 64 | rule pstem2 md 30 > ball{ 65 | {y 0.5 rx -2 rz 3 ry 3.5 s siz color #ffee11}pstem2 66 | frame 67 | } 68 | 69 | rule pstem3 md 30 > ball{ 70 | {y 0.5 rx -4 rz 2.5 ry -3 s siz color #ffee11}pstem3 71 | frame 72 | } 73 | 74 | rule pstem4 md 30 > ball{ 75 | {y 0.5 rx 1.5 rz -3.5 ry 1.5 s siz color #ffee11}pstem4 76 | frame 77 | } 78 | 79 | rule pstem5 md 30 > ball{ 80 | {y 0.5 rx 1.5 rz -1.5 ry -1.5 s siz color #ffee11}pstem5 81 | frame 82 | } 83 | 84 | rule pstem6 md 30 > ball{ 85 | {y 0.5 rx -1.5 rz -3.5 ry 1.5 s siz color #ffee11}pstem4 86 | frame 87 | } 88 | 89 | rule pstem7 md 30 > ball{ 90 | {y 0.5 rx 3 rz 1.5 ry -2.5 s siz color #ffee11}pstem5 91 | frame 92 | } 93 | 94 | rule pstem8 md 30 > ball{ 95 | {y 0.5 rx -0.5 rz 2 ry -1.5 s siz color #ffee11}pstem4 96 | frame 97 | } 98 | 99 | rule pstem9 md 30 > ball{ 100 | {y 0.5 rx 2 rz -2 ry 3 s siz color #ffee11}pstem5 101 | frame 102 | } 103 | 104 | rule frame { 105 | { s 0.1 1.1 0.1 x 5 z 5 } box 106 | { s 0.1 1.1 0.1 x 5 z -5 } box 107 | { s 0.1 1.1 0.1 x -5 z 5 } box 108 | { s 0.1 1.1 0.1 x -5 z -5 } box 109 | 110 | { s 1 0.1 0.1 y 5 z 5 } box 111 | { s 1 0.1 0.1 y 5 z -5 } box 112 | { s 1 0.1 0.1 y -5 z 5 } box 113 | { s 1 0.1 0.1 y -5 z -5 } box 114 | 115 | { s 0.1 0.1 1 y 5 x 5 } box 116 | { s 0.1 0.1 1 y 5 x -5 } box 117 | { s 0.1 0.1 1 y -5 x 5 } box 118 | { s 0.1 0.1 1 y -5 x -5 } box 119 | 120 | } 121 | -------------------------------------------------------------------------------- /Tree/tree10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/tree10.png -------------------------------------------------------------------------------- /Tree/tree11.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | set colorpool list:#6f6,#6fc,#3fc,#0fc,#3f9 3 | 4 | 5 | 5 * {z -2} 5 * {x -4} tree 6 | 5 * {z 2} 5 * {x -4} tree 7 | 8 | signboard 9 | rule signboard{ 10 | {x -1.5 y -1 z -1.5 s 0.1 1.5 0.1 color #aa0 }box 11 | 1 * {x -1.5 y -0.4 z -1.5 s 0.25 0.2 0.25} 4 * {ry 90 color #0d2} direction 12 | } 13 | 14 | rule direction{ 15 | {x 1.414 rz 45 s 1 1 0.1}box 16 | {x 0.707 s 1.414 1.414 0.1}box 17 | } 18 | //floor 19 | { y -1.5 s 1250 0.1 1250 color #333 }box 20 | 21 | //roadside 22 | { z -1.5 y -1.45 x -26.45 s 50 0.1 0.1 color #aaa }box 23 | { z 1.5 y -1.45 x -26.45 s 50 0.1 0.1 color #aaa}box 24 | { z -1.5 y -1.45 x 26.45 s 50 0.1 0.1 color #aaa }box 25 | { z 1.5 y -1.45 x 26.45 s 50 0.1 0.1 color #aaa}box 26 | 27 | { x -1.5 y -1.45 z -26.45 s 0.1 0.1 50 color #aaa }box 28 | { x 1.5 y -1.45 z -26.45 s 0.1 0.1 50 color #aaa}box 29 | { x -1.5 y -1.45 z 26.45 s 0.1 0.1 50 color #aaa }box 30 | { x 1.5 y -1.45 z 26.45 s 0.1 0.1 50 color #aaa}box 31 | 32 | //tree 33 | rule tree{ 34 | {y -1 s 0.05 1 0.05 color #bb5} box 35 | 36 | 4 * { rx 45} 1 * { s 0.05 0.05 1 color #bb5} box 37 | 3 * { ry 45} 1 * { s 0.05 0.05 1 color #bb5} box 38 | 3 * { rz 45} 1 * { s 0.05 1 0.05 color #bb5} box 39 | 40 | 41 | {rx -45 s 0.05 color #bb5} ball1 42 | {rx -90 s 0.05 color #bb5} ball1 43 | {rx -135 s 0.05 color #bb5} ball1 44 | {rx 0 s 0.05 color #bb5} ball1 45 | {rx 45 s 0.05 color #bb5} ball1 46 | {rx 90 s 0.05 color #bb5} ball1 47 | {rx 135 s 0.05 color #bb5} ball1 48 | 49 | {rz -45 s 0.05 color #bb5} ball1 50 | {rz 45 s 0.05 color #bb5} ball1 51 | {rz 90 s 0.05 color #bb5} ball1 52 | {rz 135 s 0.05 color #bb5} ball1 53 | {rz -90 s 0.05 color #bb5} ball1 54 | {rz -135 s 0.05 color #bb5} ball1 55 | 56 | {ry -45 s 0.05 color #bb5} ball2 57 | {ry 45 s 0.05 color #bb5} ball2 58 | {ry -135 s 0.05 color #bb5} ball2 59 | {ry 135 s 0.05 color #bb5} ball2 60 | } 61 | 62 | rule ball1{ 63 | { s 1.5 y 7 color #fdd} sphere 64 | pettle 65 | } 66 | 67 | rule pettle{ 68 | 1 * {y 10.5 s 2.25 color random} 10 * { ry 36 } leaf1 69 | } 70 | 71 | rule leaf1{ 72 | { x 0.75 rz 25 s 1 0.05 0.5} box 73 | } 74 | 75 | rule ball2{ 76 | pettle2 77 | { s 1.5 z 7 color #fdd} sphere 78 | } 79 | 80 | rule pettle2{ 81 | 1 * {rx 90 y 10.5 s 2.25 color random} 10 * { ry 36 } leaf2 82 | } 83 | 84 | rule leaf2{ 85 | {x 0.75 rz 25 s 1 0.05 0.5} box 86 | } 87 | -------------------------------------------------------------------------------- /Tree/tree11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/tree11.png -------------------------------------------------------------------------------- /Tree/tree6.es: -------------------------------------------------------------------------------- 1 | //Tree 6 2 | set maxdepth 500 3 | 4 | 10 * { y -0.5 sat 1 color #ccc} box 5 | 4 * { ry 90 sat 1 } spiral 6 | 7 | rule spiral w 100 md 300 > spiral2 { 8 | { color #ccc } box 9 | { y 0.2 ry 1 rz 1 rx 1.5 s 0.993 } spiral 10 | } 11 | 12 | rule spiral2 md 50 > flower { 13 | { color #ccc } box 14 | { y 0.5 rx 2.5 s 0.993 } spiral2 15 | } 16 | 17 | rule spiral w 1 { 18 | spiral 19 | { ry 180 z 0.5 rx 45 rz 0 } spiral 20 | } 21 | 22 | rule flower { 23 | 1 * { y 0.75 s 4 } 8 * { ry 45 } petal 24 | ball 25 | } 26 | 27 | rule petal { 28 | { x 0.45 rz 25 s 1 0.05 0.35 color #f09 } box 29 | } 30 | 31 | rule ball { 32 | { s 1.75 y 0.5 sat 1 color #f60 } sphere 33 | } 34 | 35 | -------------------------------------------------------------------------------- /Tree/tree6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/tree6.png -------------------------------------------------------------------------------- /Tree/tree7.es: -------------------------------------------------------------------------------- 1 | //Tree 7 2 | set maxdepth 280 3 | 4 | 1 * { h 200 } 10 *{ ry 10 y -0.5 sat 1 } box 5 | 1 * { h 200 } 4 * { ry 90 sat 1} spiral 6 | 7 | rule spiral w 100 md 60 > flower { 8 | box 9 | { y 0.55 ry 10 rz 1.5 rx 1.5 s 0.99 } spiral 10 | } 11 | 12 | rule spiral w 5 { 13 | spiral 14 | { ry 180 z 0.5 rx 45 h 3 } spiral 15 | } 16 | 17 | rule flower { 18 | 1 * { h 210 y 0.2 } 8 * { ry 45 } petal 19 | ball 20 | } 21 | 22 | rule petal { 23 | { x 0.75 rz 25 s 1 0.05 0.5} box 24 | } 25 | 26 | rule ball { 27 | { s 0.65 sat 1 h 90 } sphere 28 | } 29 | -------------------------------------------------------------------------------- /Tree/tree7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/tree7.png -------------------------------------------------------------------------------- /Tree/tree8.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | set maxdepth 500 3 | set colorpool list:#6f6,#6fc,#3fc,#0fc,#3f9 4 | 5 | 6 | 4 * { y -1 color #d54} box 7 | 4 * { ry 90 color #d54} spiral 8 | 9 | rule spiral w 100 md 50 > bunch{ 10 | box 11 | { y 0.5 s 0.995 color #d54} spiral 12 | } 13 | 14 | rule spiral w 2 { 15 | { ry 180 rx 45 z 0.27} spiral 16 | } 17 | 18 | rule spiral w 1 { 19 | {x -0.25 rz 45 } spiral 20 | } 21 | 22 | //ball 23 | 24 | rule bunch{ 25 | {s 15}sphere 26 | {s 15 }flowers 27 | } 28 | 29 | //tree 30 | rule flowers{ 31 | 32 | {rx -45 s 0.05 color #bb5} ball1 33 | {rx -90 s 0.05 color #bb5} ball1 34 | {rx -135 s 0.05 color #bb5} ball1 35 | {rx 0 s 0.05 color #bb5} ball1 36 | {rx 45 s 0.05 color #bb5} ball1 37 | {rx 90 s 0.05 color #bb5} ball1 38 | {rx 135 s 0.05 color #bb5} ball1 39 | 40 | {rz -45 s 0.05 color #bb5} ball1 41 | {rz 45 s 0.05 color #bb5} ball1 42 | {rz 90 s 0.05 color #bb5} ball1 43 | {rz 135 s 0.05 color #bb5} ball1 44 | {rz -90 s 0.05 color #bb5} ball1 45 | {rz -135 s 0.05 color #bb5} ball1 46 | 47 | {ry -45 s 0.05 color #bb5} ball2 48 | {ry 45 s 0.05 color #bb5} ball2 49 | {ry -135 s 0.05 color #bb5} ball2 50 | {ry 135 s 0.05 color #bb5} ball2 51 | } 52 | 53 | rule ball1{ 54 | { s 1.5 y 7 color #fdd} sphere 55 | pettle 56 | } 57 | 58 | rule pettle{ 59 | 1 * {y 10.5 s 2.25 color random} 10 * { ry 36 } leaf1 60 | } 61 | 62 | rule leaf1{ 63 | { x 0.75 rz 25 s 1 0.05 0.5} box 64 | } 65 | 66 | rule ball2{ 67 | pettle2 68 | { s 1.5 z 7 color #fdd} sphere 69 | } 70 | 71 | rule pettle2{ 72 | 1 * {rx 90 y 10.5 s 2.25 color random} 10 * { ry 36 } leaf2 73 | } 74 | 75 | rule leaf2{ 76 | {x 0.75 rz 25 s 1 0.05 0.5} box 77 | } 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Tree/tree8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/tree8.png -------------------------------------------------------------------------------- /Tree/tree8_2.es: -------------------------------------------------------------------------------- 1 | // Write EisenScript code here... 2 | // Write EisenScript code here... 3 | set maxdepth 500 4 | set colorpool list:#af3,#de3,#ec2,#fa6,#df6 5 | 6 | 10 * {x 35 ry 36} tree 7 | 8 | rule tree{ 9 | 4 * { y -1 color #804000} box 10 | 4 * { ry 90 color #804000} spiral 11 | } 12 | rule spiral w 100 md 50 > bunch{ 13 | box 14 | { y 0.5 s 0.995 color #804000} spiral 15 | } 16 | 17 | rule spiral w 2 { 18 | { ry 180 rx 45 z 0.27} spiral 19 | } 20 | 21 | rule spiral w 1 { 22 | {x -0.25 rz 45 } spiral 23 | } 24 | 25 | //ball 26 | 27 | rule bunch{ 28 | {s 15 color #4f4}sphere 29 | {s 15 }flowers 30 | } 31 | 32 | //tree 33 | rule flowers{ 34 | 35 | {rx -45 s 0.05 color #bb5} ball1 36 | {rx -90 s 0.05 color #bb5} ball1 37 | {rx -135 s 0.05 color #bb5} ball1 38 | {rx 0 s 0.05 color #bb5} ball1 39 | {rx 45 s 0.05 color #bb5} ball1 40 | {rx 90 s 0.05 color #bb5} ball1 41 | {rx 135 s 0.05 color #bb5} ball1 42 | 43 | {rz -45 s 0.05 color #bb5} ball1 44 | {rz 45 s 0.05 color #bb5} ball1 45 | {rz 90 s 0.05 color #bb5} ball1 46 | {rz 135 s 0.05 color #bb5} ball1 47 | {rz -90 s 0.05 color #bb5} ball1 48 | {rz -135 s 0.05 color #bb5} ball1 49 | 50 | {ry -45 s 0.05 color #bb5} ball2 51 | {ry 45 s 0.05 color #bb5} ball2 52 | {ry -135 s 0.05 color #bb5} ball2 53 | {ry 135 s 0.05 color #bb5} ball2 54 | } 55 | 56 | rule ball1{ 57 | { s 1.5 y 7 color #fdd} sphere 58 | pettle 59 | } 60 | 61 | rule pettle{ 62 | 1 * {y 10.5 s 2.25 color random} 10 * { ry 36 } leaf1 63 | } 64 | 65 | rule leaf1{ 66 | { x 0.75 rz 25 s 1 0.05 0.5} box 67 | } 68 | 69 | rule ball2{ 70 | pettle2 71 | { s 1.5 z 7 color #fdd} sphere 72 | } 73 | 74 | rule pettle2{ 75 | 1 * {rx 90 y 10.5 s 2.25 color random} 10 * { ry 36 } leaf2 76 | } 77 | 78 | rule leaf2{ 79 | {x 0.75 rz 25 s 1 0.05 0.5} box 80 | } 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /Tree/tree8_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/tree8_2.png -------------------------------------------------------------------------------- /Tree/tree9.es: -------------------------------------------------------------------------------- 1 | // Tree 9 2 | set colorpool list:#66f,#6cf,#3cf,#0cf,#39f 3 | set maxdepth 370 4 | 5 | 10 * { y -1 color #663 } box 6 | 1 * { ry 45 color #663 } 10 * { y -1 } box 7 | 8 | 8 * { ry 45 } spiral 9 | 10 | rule spiral w 100 md 220 > spiral2 { 11 | { color #663 } box 12 | { y 0.2 rz 0 rz -0.75 s 0.995 } spiral 13 | } 14 | 15 | rule spiral2 md 70 > leaf { 16 | { color #663 } box 17 | { y 0.2 rz 0.5 rx 1 s 0.995 } spiral2 18 | } 19 | 20 | rule spiral w 1 { 21 | spiral 22 | { ry 90 rx 0 } spiral 23 | } 24 | 25 | rule leaf { 26 | 1 * { h 50 y 0.5 s 2.25 color random } 8 * { ry 45 } leaf1 27 | 1 * { ry 22.5 y 0.45 s 1 color #0f5 } 8 * { ry 45 } petal 28 | { y 0.75 s 0.25 } pstem 29 | { y 0.75 s 0.25 } pstem 30 | { y 0.75 s 0.25 } pstem 31 | } 32 | 33 | 34 | rule petal { 35 | { x 0.45 rz -45 s 1 0.05 0.5 } box 36 | } 37 | 38 | rule leaf1 { 39 | { x 0.75 rz 25 s 1 0.05 0.5 } box 40 | } 41 | 42 | rule ball { 43 | { s 3.5 y 0 color #fdd } sphere 44 | } 45 | 46 | rule pstem { pstem1 } 47 | rule pstem { pstem2 } 48 | rule pstem { pstem3 } 49 | rule pstem { pstem4 } 50 | rule pstem { pstem5 } 51 | 52 | rule pstem1 md 20 > ball { 53 | { y 0.5 rx 3 rz 4 ry 3 s 0.993 color #f60 } pstem1 54 | box 55 | } 56 | 57 | rule pstem2 md 20 > ball { 58 | { y 0.5 rx -2 rz 3 ry 3.5 s 0.993 color #f60 } pstem2 59 | box 60 | } 61 | 62 | rule pstem3 md 20 > ball { 63 | { y 0.5 rx -4 rz 2.5 ry -3 s 0.993 color #f60 } pstem3 64 | box 65 | } 66 | 67 | rule pstem4 md 20 > ball { 68 | { y 0.5 rx 1.5 rz -3.5 ry 1.5 s 0.993 color #f60 } pstem4 69 | box 70 | } 71 | 72 | rule pstem5 md 20 > ball { 73 | { y 0.5 rx 1.5 rz -1.5 ry -1.5 s 0.993 color #f60 } pstem5 74 | box 75 | } -------------------------------------------------------------------------------- /Tree/tree9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankurpawar/StructureSynth/671784eea321247b06434db11163e1577ff614c1/Tree/tree9.png -------------------------------------------------------------------------------- /alhambra_full.es: -------------------------------------------------------------------------------- 1 | //tile 2 | 1 * {x 10 z 10 s 40 0.1 40 color #538}box 3 | 10 * {z 2.8 } 10 * {x 2.8}tile 4 | //tile 5 | rule tile md 8{ 6 | frame 7 | star 8 | {ry 45}tile 9 | } 10 | 11 | rule frame{ 12 | {y 0.06 x 0.7 z 0.425 s 1.05 0.02 0.02 color #ee0 }box 13 | {y 0.06 x 0.7 z -0.425 s 1.05 0.02 0.02 color #ee0}box 14 | 15 | {ry -112.5 y 0.06 x -0.305 z -1.29 s 0.465 0.02 0.02 color #ee0}box 16 | {ry -67.5 y 0.06 x 0.305 z -1.29 s 0.465 0.02 0.02 color #ee0}box 17 | } 18 | 19 | rule star{ 20 | {y 0.065 s 0.85 0.03 0.85 color #eee}box 21 | } 22 | -------------------------------------------------------------------------------- /alhambra_single.es: -------------------------------------------------------------------------------- 1 | //tile 2 | 3 | //5 * {z 2.4136 } 5 * {x 2.4136}tile 4 | tile 5 | rule tile md 4{ 6 | rect 7 | frame 8 | star 9 | {ry 45}tile 10 | } 11 | 12 | rule rect{ 13 | {s 2.4136 0.1 1 color #0e0}box 14 | } 15 | 16 | rule frame{ 17 | {y 0.06 z 0.49 s 2.4136 0.02 0.02 color #ee0 }box 18 | {y 0.06 z -0.49 s 2.4136 0.02 0.02 color #ee0}box 19 | } 20 | 21 | rule star{ 22 | {y 0.065 s 0.96 0.03 0.96 color #eee}box 23 | } -------------------------------------------------------------------------------- /tictactoe.es: -------------------------------------------------------------------------------- 1 | // Tic Tac Toe seed 112 2 | 3 | 1 * {z -0.1 s 20 20 0.1 color #eee } box 4 | 5 | tictactoe 6 | 7 | rule tictactoe md 2 > mark { 8 | { z -0.03 s 0.3 } tictactoe 9 | 10 | { x 2 y 2 z -0.03 s 0.3 } tictactoe 11 | { x -2 y -2 z -0.03 s 0.3 } mark 12 | 13 | { x 2 y -2 z -0.03 s 0.3 } tictactoe 14 | { x -2 y 2 z -0.03 s 0.3 } mark 15 | 16 | { x -2 y 0 z -0.03 s 0.3 } tictactoe 17 | { x 2 y 0 z -0.03 s 0.3 } tictactoe 18 | 19 | { x 0 y 2 z -0.03 s 0.3 } mark 20 | { x 0 y -2 z -0.03 s 0.3 } tictactoe 21 | 22 | lines 23 | } 24 | 25 | rule tictactoe md 1 > mark { 26 | { z -0.03 s 0.3 }tictactoe 27 | 28 | { x 2 y 2 z -0.03 s 0.3 } tictactoe 29 | { x -2 y -2 z -0.03 s 0.3 } mark 30 | 31 | { x 2 y -2 z -0.03 s 0.3 } tictactoe 32 | { x -2 y 2 z -0.03 s 0.3 } mark 33 | 34 | { x -2 y 0 z -0.03 s 0.3 } tictactoe 35 | { x 2 y 0 z -0.03 s 0.3 } tictactoe 36 | 37 | { x 0 y 2 z -0.03 s 0.3 } mark 38 | { x 0 y -2 z -0.03 s 0.3 } tictactoe 39 | 40 | lines 41 | } 42 | 43 | rule lines{ 44 | 1 * { y -3 s 6 0.1 0.1} 2 * { y 20 color #aa4 } box 45 | 1 * { x -3 s 0.1 6 0.1} 2 * { x 20 color #aa4 } box 46 | } 47 | 48 | rule mark{} 49 | rule mark{} 50 | 51 | rule mark{ 52 | { rz 45 s 3 } xx 53 | } 54 | 55 | rule mark{ 56 | { x 2 s 0.3 } oo 57 | } 58 | 59 | rule xx{ 60 | { y -0 s 1.5 0.1 0.1 color #48e } box 61 | { x -0 s 0.1 1.5 0.1 color #48e } box 62 | } 63 | 64 | rule oo md 50 { 65 | { x 0.06 y 0.85 rz 7.5 } oo 66 | { s 0.75 1 0.75 } box 67 | } 68 | -------------------------------------------------------------------------------- /tictactoe3d.es: -------------------------------------------------------------------------------- 1 | //tic tac toe seed 101 2 | 3 | #define dis 0.7 4 | #define off 2.75 5 | tictactoe 6 | 7 | //1 * {y -3 s 10 0.1 10}box 8 | 9 | rule tictactoe md 2 > cross { 10 | { z -1.3 s 0.3}cross 11 | 12 | {x 2 y 2 z -1.3 s 0.3}cross 13 | {x -2 y -2 z -1.3 s 0.3}tictactoe 14 | 15 | {x 2 y -2 z -1.3 s 0.3}cross 16 | {x -2 y 2 z -1.3 s 0.3}cross 17 | 18 | 19 | {x -2 y 0 z -1.3 s 0.3}tictactoe 20 | {x 2 y 0 z -1.3 s 0.3}cross 21 | 22 | {x 0 y 2 z -1.3 s 0.3}cross 23 | {x 0 y -2 z -1.3 s 0.3}cross 24 | 25 | //------------------------// 26 | { z off s 0.3}cross 27 | 28 | {x -2 y 0 z off s 0.3}cross 29 | {x 2 y 0 z off s 0.3}tictactoe 30 | 31 | {x 0 y 2 z off s 0.3}cross 32 | {x 0 y -2 z off s 0.3}tictactoe 33 | 34 | {x 2 y 2 z off s 0.3}cross 35 | {x -2 y -2 z off s 0.3}cross 36 | 37 | {x 2 y -2 z off s 0.3}cross 38 | {x -2 y 2 z off s 0.3}tictactoe 39 | 40 | //---------------------------// 41 | { z dis s 0.3}tictactoe 42 | 43 | {x -2 y 0 z dis s 0.3}cross 44 | {x 2 y 0 z dis s 0.3}cross 45 | 46 | {x 0 y 2 z dis s 0.3}tictactoe 47 | {x 0 y -2 z dis s 0.3}cross 48 | 49 | {x 2 y 2 z dis s 0.3}cross 50 | {x -2 y -2 z dis s 0.3}tictactoe 51 | 52 | {x 2 y -2 z dis s 0.3}cross 53 | {x -2 y 2 z dis s 0.3}cross 54 | 55 | lines 56 | } 57 | 58 | //==================// 59 | rule tictactoe md 1 > cross { 60 | { z -1.3 s 0.3}tictactoe 61 | 62 | {x 2 y 2 z -1.3 s 0.3}cross 63 | {x -2 y -2 z -1.3 s 0.3}cross 64 | 65 | {x 2 y -2 z -1.3 s 0.3}cross 66 | {x -2 y 2 z -1.3 s 0.3}tictactoe 67 | 68 | 69 | {x -2 y 0 z -1.3 s 0.3}cross 70 | {x 2 y 0 z -1.3 s 0.3}cross 71 | 72 | {x 0 y 2 z -1.3 s 0.3}tictactoe 73 | {x 0 y -2 z -1.3 s 0.3}cross 74 | 75 | //------------------------// 76 | { z off s 0.3}cross 77 | 78 | {x -2 y 0 z off s 0.3}cross 79 | {x 2 y 0 z off s 0.3}cross 80 | 81 | {x 0 y 2 z off s 0.3}tictactoe 82 | {x 0 y -2 z off s 0.3}cross 83 | 84 | {x 2 y 2 z off s 0.3}cross 85 | {x -2 y -2 z off s 0.3}tictactoe 86 | 87 | {x 2 y -2 z off s 0.3}cross 88 | {x -2 y 2 z off s 0.3}cross 89 | 90 | //---------------------------// 91 | { z dis s 0.3}cross 92 | 93 | {x -2 y 0 z dis s 0.3}cross 94 | {x 2 y 0 z dis s 0.3}tictactoe 95 | 96 | {x 0 y 2 z dis s 0.3}cross 97 | {x 0 y -2 z dis s 0.3}cross 98 | 99 | {x 2 y 2 z dis s 0.3}cross 100 | {x -2 y -2 z dis s 0.3}cross 101 | 102 | {x 2 y -2 z dis s 0.3}tictactoe 103 | {x -2 y 2 z dis s 0.3}cross 104 | 105 | lines 106 | } 107 | 108 | rule lines{ 109 | 1 * {y -3 s 6 0.1 0.1} 2 * { y 20 color #aaa} box 110 | 1 * {x -3 s 0.1 6 0.1} 2 * { x 20 color #aaa} box 111 | 112 | 1 * {y -3 z 2 s 6 0.1 0.1} 2 * { y 20 color #aaa} box 113 | 1 * {x -3 z 2 s 0.1 6 0.1} 2 * { x 20 color #aaa} box 114 | 115 | 1 * {y -3 x -1 z 1 s 0.1 0.1 6} 2 * { y 20 color #aaa} box 116 | 1 * {y -3 x 1 z 1 s 0.1 0.1 6} 2 * { y 20 color #aaa} box 117 | 118 | } 119 | 120 | rule cross{} 121 | 122 | rule cross{} 123 | 124 | rule cross{ 125 | { x 0 y -0 z 1 rz 45 rx 45 s 3}xx 126 | } 127 | 128 | rule cross{ 129 | {z 1 s 0.3}oo 130 | } 131 | 132 | //cross 133 | rule xx{ 134 | 1 * {s 1.5 0.1 0.1 color #00f} box 135 | 1 * {s 0.1 1.5 0.1 color #00f} box 136 | 1 * {s 0.1 0.1 1.5 color #00f} box 137 | } 138 | 139 | //sphere 140 | rule oo md 1 { 141 | {s 15 color #f00}sphere 142 | } 143 | --------------------------------------------------------------------------------