Easy visual representation of simple harmonic motion in 2D in Python using turtle

Опубликовано: 29 Октябрь 2024
на канале: Jean Joubert
305
5

Very simple visualisation of SHM in 2 dimensions with velocity and acceleration shown in the x direction. Scale_ax and scale_vx is simply used so that the scale does not get too small or too large for specific conditions (simply a clean visual way to see both vx and ax). It is a very simple python program with most of the program simply creating all the 'turtles' to show the motion.

Note ax is opposite and maximal at A while vx is maximal at 0 and zero at A.

Feel free to look at the code for improvements or questions in the link (also included code for simple pendulum):
https://www.dropbox.com/sh/jgnyrnwdj4...