How do I simulate/animate Trigonometric functions programmatically?

I am looking for a way to simulate and animate waves, and other trigonometric math functions.

A great reference for this would be “The_Simulator” Tik Tok account.

Link to the account: https://www.tiktok.com/@the_simulator

he has a lot of simulations that I want to recreate, or create similar simulations for bussiness reasons.

any help would be much appreciated.