These video lessons accompany Chapter 5 (Physics Libraries) from The Nature of Code book.
Introduction to Physics Engines Part 106 Mar 2017
In this video, I attempt to answer the questions: (1) what are Physics Engines? and (2) why would you want to use them? I discuss some common physics engines and their various pros/cons – box2d, toxiclibs, matter.js.
Introduction to Box2D06 Aug 2015
This video is an introduction to a tutorial series on the physics engine Box2D. The programming language is Java (with the jbox2d port). The Box2D for Processing library is demonstrated. In the video it’s called the old name: “PBox2D”
What makes up a Box2D world06 Aug 2015
This video goes over the basic elements of the Box2D world � body, shape, fixture, joint.
Box2D Coordinates and Vectors06 Aug 2015
This video covers the Box2D coordinate system and how to use the Vec2 class.
Adding Box2D to Processing Sketch Part 106 Aug 2015
This video covers the basics of adding Box2D to a Processing sketch. This is part 1. Part 2 gets to the code.
Adding Box2D to Processing Sketch Part 206 Aug 2015
This video covers the basics of adding Box2D to a Processing sketch. This is part 2.
Static Bodies and Chain Shapes in Box2D06 Aug 2015
This video covers things that don’t move in Box2D.
Complex Shapes in Box2D06 Aug 2015
This video covers how to create shapes beyond rectangles and circles in Box2D using PolygonShape and by attaching multiple shapes to one body.
Box2D Joints Distance Joint06 Aug 2015
This video shows how to create a distance joint.
Box2D Joints Revolute Joint06 Aug 2015
This video introduces the concept of joints in Box2D and demonstrates how to create a revolute joint.
User Controlled Objects Mouse Joint and Kinematic Type06 Aug 2015
This video shows demonstrates how to move objects in Box2D manually through the use of a mouse joint or a kinematic body type.
Applying forces in Box2D06 Aug 2015
This video demonstrates how to apply forces to objects in Box2D. Simple wind and gravitational attraction are demonstrated.
Collision Events in Box2D06 Aug 2015
This video demonstrates how to listen for collisions and trigger events at the moment of collision in Box2D.
Introduction to Matter.js07 Mar 2017
Introduction to Matter.js Continued07 Mar 2017
In this video, I expand on the example from “Introduction to Matter.js” by adding angled static shapes and circular bodies to the physics simulation.
Matter.js Deleting Bodies08 Mar 2017
This video is the third in a series on the matter.js physics engine. Here I look at how to delete off-screen bodies from the physics world, removing them from both my particle array as well as Matter.world.
Matter.js Constraints08 Mar 2017
In this video, I show you how to you can create constraints to connect rigid bodies in matter.js (with p5.js).
Matter.js Mouse Constraints09 Mar 2017
In this video, I demonstrate how to use mouse constraints with matter.js to add mouse interaction to a p5.js physics simulation sketch.