Coding, JavaScript, Murderous Maths, Physics, Simon teaching, Simon's Own Code, Simon's sketch book

Science on the Balcony: Position of a Pendulum

Simon: “The direct formula for the position of a pendulum is not what you might think”.

Simon’s code for spring and graph: https://editor.p5js.org/simontiger/sketches/mWp6gQLxz

Simon’s code for pendulum with directed fields: https://editor.p5js.org/simontiger/sketches/U__pD4iZL

Simon’s code for simple movable pendulum: https://editor.p5js.org/simontiger/sketches/koPHNu670

Simon originally got inspired to work on this project thanks to the My Physics Lab platform. Also inspired by 3Blue1Brown’s video Differential equations, studying the unsolvable and Brilliant’s Calculus Fundamentals course.

Crafty, Experiments, Murderous Maths

Calculating Pi with a Pendulum

This video has been inspired by the wonderful Matt Parker and his video on the Stand Up Math channel:

Yesterday was Pi day and we are still celebrating! Simon experiments with calculating Pi with a physical thing, a pendulum. For the experiment, he cut a cord one fourth of the local gravity value (9.8m/s^2), that is 245 cm. One full swing of the cord makes Pi (measured in seconds)! Simon measures the time the pendulum makes 10 swings and divides that number by 10, to get the average duration of a swing.

The values Simon got were pretty close! The closest he got (not in this video, but later that day) was 3,128 sec., which is exactly the same value that Matt Parker got! What is the chance of that?

The formula is t = 2Pi times square root of l over g (where l is the length of the cord and g the local gravity).

Starring the cute 3Blue1Brown Pi. Here is some extra footage, with the 3Blue1Brown Pi riding the pendulum:

Coding, Geometry Joys, Java, Milestones, Murderous Maths, Physics

Pendulum Force

This is a beautiful “lecture” that Simon in his pajamas, chocolate paste adorning is face, game me Friday morning. He spoke about pendulum force, a force he was about to apply in a coding project.

The other videos form the very beginning of the lecture, with Simon plays with sine and cosine and explains why location, velocity and acceleration can be vectors and can be angles:

And this is the code where pendulum force is used. It’s an example from The Nature of Code book by Daniel Shiffman, from Chapter 3 on Oscillation: