I wrote a simple pendulum and spring code in SFML. If you want to try it, download the files. Open x64, Debug and run the .exe file.
You can watch how it my project works: https://youtu.be/TKZr7178US4
Reference: https://www.youtube.com/watch?v=Rr-5HiXquhw&t=727s