Uploaded February 2021 | Updated September 2026, 1 week ago
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: thecodingtrain.com/tracks/the-nature-of-code-2/noc/3-angles/5-harmonic-motion
p5.js Web Editor Sketches:
πΉοΈ Basic: editor.p5js.org/codingtrain/sketches/Fn1feR81W
πΉοΈ Approximate Time: editor.p5js.org/codingtrain/sketches/uGCYH4-PN
πΉοΈ Exact Time Exercise: editor.p5js.org/codingtrain/sketches/jp2B-0Wkg
πΉοΈ Main: editor.p5js.org/codingtrain/sketches/MfvyVULHT
πΉοΈ Yoyo: editor.p5js.org/codingtrain/sketches/qBhVjZ0pn
πΉοΈ 2-Axes Exercise: editor.p5js.org/codingtrain/sketches/_ir7-suNG
π₯ Previous video: youtu.be/O5wjXoFrau4?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
π₯ Next video: youtu.be/JLAc9hMtcxk?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
π₯ All videos: youtube.com/playlist?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
Videos:
π₯ The map() function - p5.js Tutorial: youtu.be/nicMAoW6u1g
π₯ Lissajous Curve Table: 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: thecodingtrain.com
πΎ Share Your Creation! thecodingtrain.com/guides/passenger-showcase-guide
π© Suggest Topics: github.com/CodingTrain/Suggestion-Box
π‘ GitHub: github.com/CodingTrain
π¬ Discord: thecodingtrain.com/discord
βͺ Nebula: go.nebula.tv/codingtrain
π Membership: youtube.com/thecodingtrain/join
π Store: standard.tv/codingtrain
ποΈ Twitter: twitter.com/thecodingtrain
πΈ Instagram: instagram.com/the.coding.train
π₯ Coding Challenges: youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Intro to Programming: youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
π p5.js: p5js.org
π p5.js Web Editor: editor.p5js.org
π Processing: processing.org
π Code of Conduct: github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecodingtrain.com/issues/new
#forbeginners #javascript #p5js
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: thecodingtrain.com/tracks/the-nature-of-code-2/noc/3-angles/5-harmonic-motion
p5.js Web Editor Sketches:
πΉοΈ Basic: editor.p5js.org/codingtrain/sketches/Fn1feR81W
πΉοΈ Approximate Time: editor.p5js.org/codingtrain/sketches/uGCYH4-PN
πΉοΈ Exact Time Exercise: editor.p5js.org/codingtrain/sketches/jp2B-0Wkg
πΉοΈ Main: editor.p5js.org/codingtrain/sketches/MfvyVULHT
πΉοΈ Yoyo: editor.p5js.org/codingtrain/sketches/qBhVjZ0pn
πΉοΈ 2-Axes Exercise: editor.p5js.org/codingtrain/sketches/_ir7-suNG
π₯ Previous video: youtu.be/O5wjXoFrau4?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
π₯ Next video: youtu.be/JLAc9hMtcxk?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
π₯ All videos: youtube.com/playlist?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
Videos:
π₯ The map() function - p5.js Tutorial: youtu.be/nicMAoW6u1g
π₯ Lissajous Curve Table: 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: thecodingtrain.com
πΎ Share Your Creation! thecodingtrain.com/guides/passenger-showcase-guide
π© Suggest Topics: github.com/CodingTrain/Suggestion-Box
π‘ GitHub: github.com/CodingTrain
π¬ Discord: thecodingtrain.com/discord
βͺ Nebula: go.nebula.tv/codingtrain
π Membership: youtube.com/thecodingtrain/join
π Store: standard.tv/codingtrain
ποΈ Twitter: twitter.com/thecodingtrain
πΈ Instagram: instagram.com/the.coding.train
π₯ Coding Challenges: youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Intro to Programming: youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
π p5.js: p5js.org
π p5.js Web Editor: editor.p5js.org
π Processing: processing.org
π Code of Conduct: github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecodingtrain.com/issues/new
#forbeginners #javascript #p5js










