Get the latest tech news

A binary tree of all Pythagorean triples


I sketch how the stereographic projection of the Stern–Brocot tree forms an ordered binary tree of Pythagorean triples, which can be used to compute best approximations of turn angles of points on the circle and finally trigonometric functions.

To get a visual idea of the tree, the following diagram maps the nodes to their rational counterparts on circle quadrants whose radii increase with each level. Such an order is provided by a simpler enumeration covering all rational points on the full circle, the stereographic projection of the Stern–Brocot tree, which will be the subject of the rest of this text. This means that we also can compute best approximations trigonometric functions, because the x-coordinate of the circle point is the cosine of the turn angle, the y-coordinate the sine.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of pythagorean

pythagorean

Photo of binary tree

binary tree

Photo of Pythagorean triples

Pythagorean triples

Related news:

News photo

Five or ten new proofs of the Pythagorean Theorem

News photo

Median filtering (2022)

News photo

An artist's perplexing tribute to the Pythagorean Theorem (2009)