Following on from this post about the simple double pendulum, (two bobs connected by light, rigid rods), this post animates the double compound pendulum (also called a double complex or physical pendulum): two rods connected to each other, with their mass distributed along their length. …
The Padovan sequence is a cousin of the more famous Fibonacci sequence defined by the initial values and the recurrence relation . That is, the next value is obtained not by summing the previous two values but by summing the two values before the last …
Following on from this previous post, here is a short tutorial on creating this and similar charts using pandas by automatically downloading data from Johns Hopkins University's CSSE GitHub repository (the "JHU/CSSE dataset"). The code described here is available on my GitHub repository First, we'll …
The Centre for Systems Science and Engineering (CSSE) at Johns Hopkins University publishes daily statistics of the number of confirmed cases of COVID-19 by country on its GitHub page. The short script below pulls data from this page to plot a bar chart of cases …
The Trapped Knight problem is a chess-based problem apparently invented by Neil Sloane and giving rise to a finite number sequence in his Online Encyclopedia of Integer Sequences (OEIS A316667). The squares of an infinite chess board are numbered in a spiral, as in this …
The Recamán sequence is a famous sequence invented by the Colombian mathematician, Bernardo Recamán Santos. It is defined by the following algorithm, starting at : if this number is positive and has not already appeared in the sequence; otherwise . It was covered in a …
This blog post was inspired by Holly Krieger's video for Numberphile. The Möbius function, , is related to the factorization of the positive integer through where is the number of prime factors of , is the number of distinct prime factors of , and is …
The quadtree data structure is a convenient way to store the location of arbitrarily-distributed points in two-dimensional space. Quadtrees are often used in image processing and collision detection. A quadtree works by recursively partitioning a two-dimensional space into regions represented by nodes which are allowed …
The UK's Ordnance Survey mapping agency now makes its 50 m resolution elevation data freely-available through its online OpenData download service. This article uses Python, NumPy and Matplotlib to process and visualize these data without using a specialized GIS library. First create a directory, such …
The equation for the temperature-dependence of the diffusion of hydrogen in tungsten may be written in Arrhenius form: where the temperature, , and activation energy, , are expressed in eV and the pre-exponential Arrhenius parameter, , and rate constant, , take units of . From …