Coding Challenge #20: 3D Cloth with toxiclibs
Boing! Using some particles and some springs with the Toxiclibs physics library, I create a 3D cloth simulation in Processing. Toxiclibs can now be downloaded from Processing's library manager. Code: https://thecodingtrain.com/challenges/20-3d-cloth-simulation
πΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/U6n24GfsD
π₯ Previous video: https://youtu.be/z86cx2A4_3E?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Next video: https://youtu.be/6z7GQewK-Ks?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
π Toxiclibs Physics Library: http://haptic-data.com/toxiclibsjs
Live Stream Archive:
π΄ Coding Train Live 42: https://youtu.be/nfU-NqnXn1o?t=8453s
Related Coding Challenges:
π #62 Plinko with Matter.js: https://youtu.be/KakpnfDv_f0
π #159 Simple Pendulum Simulation: https://youtu.be/NBWMtlbbOag
π #160 Spring Forces: https://youtu.be/Rr-5HiXquhw
Timestamps:
0:00 Introduction
1:10 What is Verlet Physics?
1:54 Code! Create Particles
5:27 Add Physics to the Particles
6:17 Add Gravity
8:41 Create Springs between Particles
11:51 Lock Particles
13:26 How to make a Cloth?
14:06 Code! Create a Cloth
20:22 Add Gravity back in
21:30 Make it 3 dimensional
24:06 Pin the Cloth on 4 Corners
28:18 What you can do with Toxiclibs
28:40 Where missing some Springs
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://discord.gg/hPuGy2g
π 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
#3d #cloth #physics #simulation #processing #toxiclibs