The Reutersvärd Triangle is an example of an impossible object: a two-dimensional optical illusion perceived as a projection of a three-dimensional object that cannot exist. The Python code below creates an SVG image of Reutersvärd's impossible triangular arrangement of cubes, similar to the more famous …
The van der Waals equation of state for a gas is: in terms of the pressure, , molar volume, and temperature, . and are constants which depend on the gas, so it is often useful to recast this equation into reduced form: or equivalently where …
Using AxesGrid Matplotlib has included the AxesGrid toolkit since v0.99. One of the useful things this allows you to do is include "inset" figures which are often used to show greater detail of a region of the enclosing plot, as in this example (the graph …
The Theis equation This post is also available as a Jupyter Notebook. The drawdown or change in hydraulic head, (a measure of the water pressure above some geodetic datum) a distance from a well at time from which water is being pumped at a constant …
The Hamiltonian of a simple pendulum of mass and length may be written Or, dividing by the moment of inertia, , Contours of constant in the phase space are plotted below, with the contour corresponding to the separatrix highlighted. This is the value of corresponding …
Viviani's curve is the line of intersection between a sphere of radius and a cylinder of radius which is tangent to the sphere and also passes through its centre. The shape has the following parametric equation: It is calculated and plotted using Matplotlib in the …
A binary regular solution is one in which the two components, A and B, mix with an entropy of mixing given by the ideal solution model, but have a non-zero enthalpy of mixing given by the relation where is a parameter describing the difference between …
The Klauber Triangle (first proposed by the American herpetologist Laurence Monroe Klauber) is a simple way to visualize the prime numbers, similar to the Ulam Spiral. It is constructed by creating a triangle of the natural numbers and then highlighting only the primes: Here is …
The Ulam Spiral is a simple way to visualize the prime numbers which reveals unexpected, irregular structure. Starting at the centre of a rectangular grid of numbers and spiralling outwards, mark the primes as 1 and the composite numbers as 0. The following code generates …
The website exoplanets.org hosts a repository of data on over 5000 exoplanets discovered by various missions and techniques. For this post, I have extracted data on the mass and orbital period of 2951 exoplanets: exoplanet-data-160824.csv. The planetary masses are expressed relative to the mass of …