Position of a Pendulum

The direct formula for the position of a pendulum is not what you might think. My code for spring and graph: https://editor.p5js.org/simontiger/sketches/mWp6gQLxz

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

My code for simple movable pendulum: https://editor.p5js.org/simontiger/sketches/koPHNu670

The pendulum graph used in the video comes from MyPhysicsLab .

Inspired by 3Blue1Brown's video "Differential equations, studying the unsolvable" and Brilliant's Calculus Fundamentals course.