Set pendulum amplitude in degrees and press the green flag. Turbo mode helps with smoothness.
The math behind exactly simulating a pendulum is quite complicated. Fortunately, the amazing Fábio Lima has already summarised it and produced a formula for finding the position of a pendulum over time. It can be found at: https://www.researchgate.net/publication/327828391_Simple_but_accurate_periodic_solutions_for_the_nonlinear_pendulum_equation This particular project uses formula 16 to find the pendulum position and formula 20 to calculate the elliptic sine.