3.5 Simple Harmonic Motion - Nature of Code

3.5 Simple Harmonic Motion - Nature of Code

Subscribers:
1,740,000
Published on ● Video Link: https://www.youtube.com/watch?v=m463X1cqV6s



Duration: 12:10
34,564 views
1,053


What is a sine wave? In this video, I demonstrate how to use the sin() function in p5.js to simulate simple harmonic motion. Code: https://thecodingtrain.com/tracks/the-nature-of-code-2/noc/3-angles/5-harmonic-motion

p5.js Web Editor Sketches:
πŸ•ΉοΈ Basic: https://editor.p5js.org/codingtrain/sketches/Fn1feR81W
πŸ•ΉοΈ Approximate Time: https://editor.p5js.org/codingtrain/sketches/uGCYH4-PN
πŸ•ΉοΈ Exact Time Exercise: https://editor.p5js.org/codingtrain/sketches/jp2B-0Wkg
πŸ•ΉοΈ Main: https://editor.p5js.org/codingtrain/sketches/MfvyVULHT
πŸ•ΉοΈ Yoyo: https://editor.p5js.org/codingtrain/sketches/qBhVjZ0pn
πŸ•ΉοΈ 2-Axes Exercise: https://editor.p5js.org/codingtrain/sketches/_ir7-suNG

πŸŽ₯ Previous video: https://youtu.be/O5wjXoFrau4?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
πŸŽ₯ Next video: https://youtu.be/JLAc9hMtcxk?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
πŸŽ₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM

Videos:
πŸŽ₯ The map() function - p5.js Tutorial: https://youtu.be/nicMAoW6u1g
πŸŽ₯ Lissajous Curve Table: https://youtu.be/--6eyLO78CY

Timestamps:
0:00 Back again!
0:21 Why does a graph of sine look like a wave?
2:14 Let's make a breathing circle
4:24 Amplitude and period
7:12 Can we make the period about one second?
8:13 So what's frequency?
8:51 Let's play with increment
10:00 Map sin to y position
10:53 What will you create?

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

πŸš‚ Website: http://thecodingtrain.com/
πŸ‘Ύ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
πŸ’‘ GitHub: https://github.com/CodingTrain
πŸ’¬ Discord: https://thecodingtrain.com/discord
βœͺ Nebula: https://go.nebula.tv/codingtrain
πŸ’– Membership: http://youtube.com/thecodingtrain/join
πŸ›’ Store: https://standard.tv/codingtrain
πŸ–‹οΈ Twitter: https://twitter.com/thecodingtrain
πŸ“Έ Instagram: https://www.instagram.com/the.coding.train/

πŸŽ₯ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

πŸ”— p5.js: https://p5js.org
πŸ”— p5.js Web Editor: https://editor.p5js.org/
πŸ”— Processing: https://processing.org

πŸ“„ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new

#forbeginners #javascript #p5js