A blog of Python-related topics and code.

The equation of the circle through three points

The equation of the circle containing three (non-colinear) points can be found using the following procedure.

A circle problem

A recent tweet by @iwontoffendyou posed the following problem: with reference to the figure below, what is the radius of the orange circle, which is tangent to the $y$-axis, the unit circle and the curve $y = \sqrt{x}$?

The Square Roots of Integers Visualized as Sharks Teeth

The Spiral of Theodorus (also known as the Snail of Pythogoras), illustrated below, is a well-known visualization of the square roots of the integers as the length of the hypotenuses of a sequence of right triangles, placed edge-to-edge.

Cool DOIs in Python

A DOI (digital object identifier) is a persistent identifier used to uniquely identify various objects (usually documents or data sets). DOIs are typically presented as a link consisting of a proxy, a prefix and a suffix: for example:

Dyck paths and Catalan numbers

A Dyck path can be described as a sequence of $n$ horizontal steps for which, at each step a vertical step of $+1$ or $-1$ is taken subject to the constraints that the vertical coordinate never decreases below its initial value and the number of "up" and "down" steps is equal. For example,