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.
Or read this on Hacker News