Uploaded February 2021 | Updated September 2026, 1 week ago
What does a sine wave look like? In this video I look at how to graph and animate a sine wave in p5.js varying the period and phase. Code: thecodingtrain.com/tracks/the-nature-of-code-2/noc/3-angles/6-graphing-sine-wave
p5.js Web Editor Sketches:
πΉοΈ Sine Wave Graph Exercise: editor.p5js.org/codingtrain/sketches/EIbEYLTaZ
πΉοΈ Playing With Period: editor.p5js.org/codingtrain/sketches/SbRC-G0lU
πΉοΈ Graphing Wave: editor.p5js.org/codingtrain/sketches/c_S9jiXz-
πΉοΈ Circular Wave Exercise: editor.p5js.org/codingtrain/sketches/mOm2Is7ba
π₯ Previous video: youtu.be/m463X1cqV6s?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
π₯ Next video: youtu.be/okfZRl4Xw-c?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
π₯ All videos: youtube.com/playlist?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
Timestamps:
0:00 Good to see you again!
0:31 How do we graph a wave?
1:30 Let's do that right now!
3:18 Let's try varying the period
4:22 Why are we here again?
5:05 Change the starting angles
6:52 What happens if we go back to angular velocity?
7:19 Whoa! Let's use a static increment value
8:10 Go make something awesome!
9:29 See you in the next video!
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 does a sine wave look like? In this video I look at how to graph and animate a sine wave in p5.js varying the period and phase. Code: thecodingtrain.com/tracks/the-nature-of-code-2/noc/3-angles/6-graphing-sine-wave
p5.js Web Editor Sketches:
πΉοΈ Sine Wave Graph Exercise: editor.p5js.org/codingtrain/sketches/EIbEYLTaZ
πΉοΈ Playing With Period: editor.p5js.org/codingtrain/sketches/SbRC-G0lU
πΉοΈ Graphing Wave: editor.p5js.org/codingtrain/sketches/c_S9jiXz-
πΉοΈ Circular Wave Exercise: editor.p5js.org/codingtrain/sketches/mOm2Is7ba
π₯ Previous video: youtu.be/m463X1cqV6s?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
π₯ Next video: youtu.be/okfZRl4Xw-c?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
π₯ All videos: youtube.com/playlist?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
Timestamps:
0:00 Good to see you again!
0:31 How do we graph a wave?
1:30 Let's do that right now!
3:18 Let's try varying the period
4:22 Why are we here again?
5:05 Change the starting angles
6:52 What happens if we go back to angular velocity?
7:19 Whoa! Let's use a static increment value
8:10 Go make something awesome!
9:29 See you in the next video!
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










