Shop Mobile More Submit  Join Login

Pythagoras tree in Stucture Synth

Sat Mar 28, 2015, 9:00 PM by tatasz:icontatasz:
:iconprojecteducate:
:iconprojecteducate:


Fractal Art Week



In this tutorial, I will explain how to make simple Pythagoras trees in Structure Synth.

Getting started

You can learn what a Pythagoras Tree is here: en.wikipedia.org/wiki/Pythagor…. A good example of this type of fractals is the work below:

What is a Fractal? by TaraRoys

Also check the basic Structure Synth commands here: structuresynth.sourceforge.net…
I will explain the formulae and rules that will be used, but still it is useful to take a look at the basics.


Building a basic tree


The first step is to create the "trunc" rectangle:

    rule base{{s 0.1 1 0.1} box}
    {s 100 100 0.1 z -0.5 color grey } box
    base

In the code above, the first line defines a rule called "base", which creates the red block which will be our trunk. The {s 0.1 1 0.1} defines the size of this block.

The second line draws a huge grey block that will be our background. I set quite a large size to it (100x100 and 0.1 unit thick). The z -0.5 command sets a shift of 0.1 on the z axis, so it is under our red block. The last command, color grey, sets the object color to grey.

Finally, third line executes the "base" rule, drawing the red block.

Untitled Drawing by tatasz

Now, the branches:

Untitled Drawing by tatasz

The left branch is a scaled down copy of the main "trunc", shifted and rotated. So you need a rule that takes the main red block, rotates it CCW, shifts it a bit left (x axis) and up (y axis) and scales it down a bit.

    rule base{{s 0.1 1 0.1} box}
    rule pythagoras {
    {x -0.25 y 0.9 rz 30 s 0.9}pythagoras
    base}

    {s 100 100 0.1 z -0.5 color grey } box
    pythagoras


This is what the rule "pythagoras" does. Unlike the first rule, "base", this rule is recursive: on each step, it draws the base rule, and then a shifted (0.25 to left and 0.9 up), rotated (30 degrees CCW) and scaled down (0.9 of the original size) "pythagoras" rule:

X3 by tatasz

Thats one nice swirl, but a pythagoras tree branches in two on each iteration. The second branch is just a mirrored version of the first:

    rule base{{s 0.1 1 0.1} box}
    rule pythagoras {
    {x -0.25 y 0.9 rz 30 s 0.9}pythagoras
    {x 0.25 y 0.9 rz -30 s 0.9}pythagoras
    base}
    {s 100 100 0.1 z -1 color grey } box
    pythagoras


The result looks like this:

X4 by tatasz

Now, time to experiment.
Try changing the rotation angle (make sure you change the shift too):

I2 by tatasz

Or set different rules for each branch:

I3 by tatasz

Or even add some crazy randomness:

If by tatasz

Add a Comment:
 
:iconfractal2cry:
fractal2cry Featured By Owner Mar 29, 2015
well done!
Reply
:iconthargor6:
thargor6 Featured By Owner Mar 29, 2015
Again, loved this tutorial, you are awesome at those!
Reply
:iconbeltaneh:
Beltaneh Featured By Owner Mar 29, 2015
Thank you very much for this tutorial :clap:
Reply
:iconpiethein21:
piethein21 Featured By Owner Mar 29, 2015  Hobbyist Digital Artist
very cool :D grazie mille :D
Reply
Add a Comment:
 
×

:icontatasz: More from tatasz


Featured in Collections

Articles and journals by Eitvys200

dA Related by Arichy

Project Educate by pica-ae


More from DeviantArt



Details

Submitted on
March 28, 2015
Submitted with
Sta.sh Writer
Link
Thumb

Stats

Views
5,104
Favourites
23 (who?)
Comments
4
×