September 2017
Beginner
275 pages
5h 42m
English
Let’s take a look at some code for Gauss-Seidel relaxation on a chain of springs joined together to make a soft body. We’ll start with our Pool End Game code from Chapter 3 with all of the pool game-specific code removed. Technically what I’m about to show you is a toy, not a game, because while you can play with it, there is no concept of winning or losing or even a score. Let’s call it the Ball and Spring Toy.
The Ball and Spring Toy lets you play with a body made up of a bunch of balls connected by constraints. The constraints can be either stick-like (with no springiness) or spring-like (with lots of springiness). You can cycle through various types of bodies and you can apply impulses to them to see how they react. ...