@TheCodingTrain
  @TheCodingTrain
The Coding Train | Coding Challenge 160: Spring Forces @TheCodingTrain | Uploaded 3 years ago | Updated 5 hours ago
Boing! Time to simulate a spring force! This challenge fits into chapters 2 and 3 of the Nature of Code and demonstrates how to simulate the oscillating motion of a spring using vectors and forces. thecodingtrain.com/challenges/160-spring-forces

p5.js Web Editor Sketches:
πŸ•ΉοΈ Simple Spring: editor.p5js.org/codingtrain/sketches/dcd6-2mWa
πŸ•ΉοΈ Spring Vector: editor.p5js.org/codingtrain/sketches/_A2pm_SSg
πŸ•ΉοΈ Spring OOP: editor.p5js.org/codingtrain/sketches/9BAoEn4Po
πŸ•ΉοΈ Soft Spring: editor.p5js.org/codingtrain/sketches/S5dY7qjxP

πŸŽ₯ Previous Coding Challenge: youtu.be/NBWMtlbbOag?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ All Coding Challenges: youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

πŸŽ₯ Previous Nature of Code Video: youtube.com/watch?v=NBWMtlbbOag&list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
πŸŽ₯ Next Nature of Code Video: youtube.com/watch?v=syR0klfncCk&list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
πŸŽ₯ All Nature of Code Videos: youtube.com/playlist?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM


Links discussed in this video:
πŸ”— Nature of Code 3.10 Spring Forces: natureofcode.com/book/chapter-3-oscillation/index.html#310-spring-forces
πŸ”— Nature of Code Playlist: thecodingtrain.com/learning/nature-of-code/index
πŸ”— toxiclibs.js: http://www.haptic-data.com/toxiclibsjs
πŸ”— curveVertex() (p5.js Reference): p5js.org/reference/#/p5/curveVertex

Other videos mentioned in this video:
πŸŽ₯ Texturing Cloth Simulation - Coding Challenge #63: youtu.be/JunJzIe0hEo
πŸŽ₯ Simple Particle System - Coding Challenge #78: youtu.be/UcdigVaIYAk

Timestamps:
0:00 Choo choo!! Springs Coding Challenge!
0:40 Explain! What is Hooke's Law?
2:51 Code! Let's make a 1 dimensional spring!
5:13 Explain! How can we bring in vectors?
7:17 Code! Let's adjust the code to use vectors.
11:57 Code! Let's add gravity!
13:03 Code! How can we control the spring with our mouse?
13:53 Explain! But wait!! Particles!
15:14 Copy & Paste! A particle class.
16:41 Code! Let's make bob and anchor particles.
18:01 Code! We need a spring class.
21:32 Debug! What is missing?
23:16 It works!
24:16 Code! But wait!! Particle system!
25:28 Code! Let's connect the particles with springs.
27:12 Code! We can refine it a bit.
29:29 Code! Playing with beginShape() and endShape().
31:07 Ideas! If you make a swishy robot share it with me!

πŸš‚ Website: http://thecodingtrain.com
πŸ‘Ύ Share Your Creation! thecodingtrain.com/Guides/community-contribution-guide.html
🚩 Suggest Topics: github.com/CodingTrain/Rainbow-Topics
πŸ’‘ GitHub: github.com/CodingTrain
πŸ’¬ Discord: discord.gg/hPuGy2g
πŸ’– Membership: http://youtube.com/thecodingtrain/join
πŸ›’ Store: standard.tv/codingtrain
πŸ“š Books: amazon.com/shop/thecodingtrain
πŸ–‹οΈ 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
Coding Challenge 160: Spring ForcesThe mouse sees: A collaborative zine for the Computer Mouse Conference (Night 2)Coding Train Live: Autoencoders Part 2Coding Train Live!Guest Conductor: Amigoscode2.3: Incrementation Operators - p5.js Tutorial1.6 Acceleration Vector - The Nature of CodeSide Project Sunday?#genuary16 10,000 snowflakesApple ][ Coding Challenge: Fractal Tree2.1 Simulating Forces: Gravity and Wind - The Nature of CodeCoding Challenge #48: White House Social Media Data Visualization

Coding Challenge 160: Spring Forces @TheCodingTrain

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER