tubeshowcase●1,059,439 videos♡ My collection 0
← Learn to Code

Learn to Code30:40

Coding Challenge #20: 3D Cloth with toxiclibs

The Coding Train ↗

From the creator

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/ 👾 S

Published 2016-06-09 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code