
3.7: Additive Waves - The Nature of Code
This video builds on the previous sine wave visualization in p5.js example. Here, I build a Wave class with variables for period, amplitude, and phase, and demonstrate how to add multiple wave patterns together! Code: https://thecodingtrain.com/tracks/the-nature-of-code-2/noc/3-angles/7-additive-waves
πΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/qcRsZ_O5a
π₯ Previous video: https://youtu.be/JLAc9hMtcxk?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
π₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
Videos:
π₯ Simple Pendulum Simulation: https://youtu.be/NBWMtlbbOag
Timestamps:
0:00 Welcome back!
0:26 How do we make a wave class?
2:02 The formula we'll use for a wave.
4:53 Let's make a wave class.
7:33 Why did we spend the time to make the wave class?
8:08 Adding waves together!
9:39 Let's animate it!
10:40 A couple small improvements.
11:21 I hope you try some of these ideas!
11:43 What's next?
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