Variations on Pythagoras' Tree

Malin Christersson ◊◊◊

JavaScript is needed!

Select tree type, colour, and height of tree.
Click on the animated tree to toggle the variation of curve tightness, on or off.

When constructing a Pythagoras' tree, you start with a right-angled triangle and three squares. For a detailed explanation see Pythagoras & Thales. Then you build a tree recursively. By using Thales' theorem, you can vary the triangle by moving the vertex at the right angle along a circle. This is how you make an animated Pythagoras' tree.

The tree types

The first (leftmost) tree type is a regular animated Pythagoras' tree.

tree type 1a
Pythagoras' tree of height 1
tree type 1b
Pythagoras' tree of height 2

The second tree type is made by drawing an open curve between four vertices of each square. The tightness of the curve varies.

tree type 2a
Tightness -3
tree type 2b
Tightness 0
tree type 2c
Tightness 3

The third tree type is made by drawing one open curve along the left and right branch of the tree. The vertices at the right angle of each right-angled triangle are shown as dots.

tree type 3a
Tightness -3
tree type 3b
Tightness 0
tree type 3c
Tightness 3

The fourth tree type is made by drawing one open curve along the left and right branch of the tree. Then one such branch is drawn for each sub-tree.

tree type 4a
Height 0
tree type 4b
Height 1
tree type 4c
Height 2

Animated gifs

Pink Pythagoras tree on tumblr.

The code

The processing-code can be seen at OpenProcessing: Variations on Pythagoras' Tree.

under an Attribution-NonCommercial-ShareAlike CC license
Creative Commons License