He also created an account on the library website, but couldn’t figure out how to create a new project. We should look at it together this week when I finally have more time.
These are two small videos of Simon trying the D3 library out:
Simon created a website to assist people using Box2D. The website features the jBox2D helper.
Link to Simon’s website: https://simon-tiger.github.io/box2d-helper/
GitHub Issue about the project: https://github.com/CodingTrain/Rainbow-Topics/issues/616
Simon returned to his old Attractor sketch in Processing once again, now adding some new functions:
The code original came from Daniel Shiffman’s book The Nature of Code, Chapter 5 (Physics Libraries) and from the ToxicLibs library, but Simon has customized it quite a bit.
In the end, he got tired of writing all the coordinates for the terrain vertices, but he did get quite far.
Applying Box2D to translate from pixels into mm:
Some more translations, this time from Codea (Lua) into Processing (Java).
Physics Lab tests from Codea:
Several recent translations of Box2D examples (from Daniel Shiffman’s book The Nature of Code) into Codea, that is Processing (Java) into Lua. Both Box2D and Codea are physics libraries.
Revolute Joint (Windmill):
In this project Simon combined two exercises and one example from Daniel Shiffman’s Nature of Code book, Chapter 5 – Physic Libraries. The specific physics library used here is Box2D. Simon combined exercises 5.6 (Bridge) and 5.10 (Attraction Apply Force), and example 5.7 (Create a windmill) to create a motor that catapults particles towards an attractor. If the particles fly past the attractor, “bricks” can be added to the canvas by clicking the mouse – the weight of the bricks helps regulate the motor in the right direction. For this project, both gravitational attraction and global gravity force were applied: