Many, many years ago I came up with an idea about a fractal that would be based on right triangles and squares. People that had less mathematical experience than I, didn’t take me seriously, when I told about my idea. They thought that this was just some kind of nonsense.

I didn’t visualize my idea and forgot the whole thing… Later, after many years when I started to read e-books about fractals, I found sophisticated ideas how to make nice colored Pythagorean fractal trees. I think I’ve been dealing with wrong people in the past… đź™‚

This article discusses only about simplest possible Pythagorean fractal tree, most symmetrical version of it.

We start with a right triangle with two 45 degrees angles and one 90 degrees angle and visually speaking turn the triangle so that hypotenuse is at the bottom:

Next we draw squares against the sides of the triangle so that the length of the side of the square is the length of the side of the triangle:

Next we imagine new right triangles to the farthest side of the â€ťbranchâ€ť squares and do the same process as earlier: We draw squares to all the sides of the triangles.

This process is continued infinitely and we have a fractal! …that looks like a tree.

The length of the new hypotenuse *c*‘ = cos(45Â°) * *c*, where c is the length of the hypotenuse of previous iteration loop’s right triangle(s).

When generating the tree, I recommend using Java with JavaFX package or using JavaScript, because with those one can use the following methods:

- beginPath
- translate
- rotate
- save
- restore

These methods make it quite easy to generate a fractal tree. When drawing the tree into screen, only the squares are drawn.

The e-book below discusses lots of fractal programming and has also an example codes in JavaScript generating these kinds of trees (also colored):

Let’s have some fun with the Pythagorean theorem, we’ll deduceÂ the general equation of circle in **R**^{2} with the Pythagorean theorem.

The Pythagorean theorem states that right triangle’s sum of squares of the other sides equal to the square of the hypotenuse: *a*^{2} + *b*^{2} = *c*^{2}.

The definition of the (analytical) circle: The set of the points that’s distance from a given point *P* is constant *r*.

In the picture below is drawn to plane to arbitrary a position a circle, that’s center is *P* = (*x*_{0}, *y*_{0}). Inside the circle is drawn a right triangle that’s other side’s end point is (*x*, *y*‘) and the other’s endpoint is (*x*‘, *y*).

Now the horizontal side’s length is |*x* â€“ *x*_{0}| and vertical sides’s length is |*y* â€“ *y*_{0}| and hypotenuse again is *r*, when according to Pythagorean theorem

(|*x* â€“ *x*_{0}|)^{2}Â + (|*y*Â â€“Â *y*_{0}|)^{2}Â =Â *r*^{2}

<=> (*x* â€“ *x*_{0})^{2}Â + (*y*Â â€“Â *y*_{0})^{2}Â =Â *r*^{2}

Because square is positive, the absolute values can be removed and what’s remaining is the familiar general equation of circle.

The simplest case is the circle where the center is at origin.

Then the length of sides of the right triangle are

|*x* â€“ 0| = |*x*| and |*y* â€“ 0| = |*y*|

and the hypotenuse is again *r*, when according to Pythagorean theorem

*x*^{2} + *y*^{2} = *r*^{2}

I don’t know how â€ťofficialâ€ť way to deduce the equation of circle this is, but at least this gives the result… đź™‚

There is story behind all this that began in the beginning of the year 1999…