Mathematics with Pi – and earth measurement with network requests

In Ian Stewart’s book, Professor Stewart’s Casbook of Mathematical Mysteries, he writes about an easy way one might prove that the earth is not flat. His “easy” proof can be done by booking some flights and timing them… or, simply looking up actual flights from certain cities to other cities. If it is much much shorter for a certain flight from A to D while A to B to C to D in a nearly straight line is much longer, it’s effectively a proof you can go around the world without falling off…

Continue reading “Mathematics with Pi – and earth measurement with network requests”

Euclid’s Doodle – and writing a visualization with Matplotlib

On page 110 of Professor Stewart’s Casebook of Mathematical Mysteries, he shows a neat visual way of calculating the GCD (Greatest common denominator, aka HCF, Highest common factor. Given a box with sides of two different lengths, draw squares from the lesser side until you can draw no more. Then continue from the corner the other direction. The smallest square has edge length of the GCD!

Continue reading “Euclid’s Doodle – and writing a visualization with Matplotlib”