Physics Libraries
These video lessons accompany Chapter 5 (Physics Libraries) from The Nature of Code book.
- #5.0.0
Introduction to Physics Engines Part 1
06 Mar 2017In 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.
- #5.1
Introduction to Box2D
06 Aug 2015This 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”
- #5.2
What makes up a Box2D world
06 Aug 2015This video goes over the basic elements of the Box2D world � body, shape, fixture, joint.
- #5.3
Box2D Coordinates and Vectors
06 Aug 2015This video covers the Box2D coordinate system and how to use the Vec2 class.
- #5.4
Adding Box2D to Processing Sketch Part 1
06 Aug 2015This video covers the basics of adding Box2D to a Processing sketch. This is part 1. Part 2 gets to the code.
- #5.5
Adding Box2D to Processing Sketch Part 2
06 Aug 2015This video covers the basics of adding Box2D to a Processing sketch. This is part 2.
- #5.6
Static Bodies and Chain Shapes in Box2D
06 Aug 2015This video covers things that don’t move in Box2D.
- #5.7
Complex Shapes in Box2D
06 Aug 2015This video covers how to create shapes beyond rectangles and circles in Box2D using PolygonShape and by attaching multiple shapes to one body.
- #5.8
Box2D Joints Distance Joint
06 Aug 2015This video shows how to create a distance joint.
- #5.9
Box2D Joints Revolute Joint
06 Aug 2015This video introduces the concept of joints in Box2D and demonstrates how to create a revolute joint.
- #5.10
User Controlled Objects Mouse Joint and Kinematic Type
06 Aug 2015This video shows demonstrates how to move objects in Box2D manually through the use of a mouse joint or a kinematic body type.
- #5.11
Applying forces in Box2D
06 Aug 2015This video demonstrates how to apply forces to objects in Box2D. Simple wind and gravitational attraction are demonstrated.
- #5.12
Collision Events in Box2D
06 Aug 2015This video demonstrates how to listen for collisions and trigger events at the moment of collision in Box2D.
- #5.17
Introduction to Matter.js
07 Mar 2017This video is an introduction to the physics engine Matter.js, a 2D JavaScript physics library that supports rigid body collisions and constraints. In this video I show you how to set up your code to use the library in combination with p5.js for rendering.
- #5.18
Introduction to Matter.js Continued
07 Mar 2017In this video, I expand on the example from “Introduction to Matter.js” by adding angled static shapes and circular bodies to the physics simulation.
- #5.19
Matter.js Deleting Bodies
08 Mar 2017This 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.
- #5.20
Matter.js Constraints
08 Mar 2017In this video, I show you how to you can create constraints to connect rigid bodies in matter.js (with p5.js).
- #5.21
Matter.js Mouse Constraints
09 Mar 2017In this video, I demonstrate how to use mouse constraints with matter.js to add mouse interaction to a p5.js physics simulation sketch.