Definition: positive integers such that a² + b² = c²

This is an exercise in paper folding. Start with a square piece of paper of unit side and bring lower-left corner A somewhere on the top egde and make a single fold. The task is the calculation of x and y, vertical coordinates of B and C, respectively.

Enter any fraction 0 < b < 1


The calculation is done for several values of b.
Pythagorean Triples are shown in each case.


Sample code


Ref: 3-4-5 Üçgeni