tubeshowcase●1,070,231 videos♡ My collection 0
← Learn to Code

Learn to Code12:10

3.5 Simple Harmonic Motion - Nature of Code

The Coding Train ↗

From the creator

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

Published 2021-02-07 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code