2D Physics

I create my 2D physics animations using processing and box2d.

To create physics animations using these programs, you need to know some java.

If you do know java and want to create your own physics animations, all you need to do is follow the steps below.

  1. Install Processing
  2. Open processing and create a sketch
  3. Select the sketch menu, import library, then manage libraries.
  4. Find “Box2D for Processing” and install it.
  5. Create a physics render!
  6. If you want to add more, but don’t know how, check out the docs for processing and the original (c++) box2d.

If you don’t know java, but want to learn it with physics animations, follow these steps:

  1. Follow the steps above until step 4
  2. Find the processing folder (usually C:\Users\your_username\Documents\Processing)
  3. Open it
  4. Download the demo zip here.
  5. Extract the zip folder.
  6. Double click the file named physics_demo.
  7. Click the triangle in the top of the window to run the demo.
  8. A screen should open with a display showing something like this. If it doesn’t work, please comment with the problem on this page so that I can improve my guide.
  9. Experiment with changing variables to learn about how to code in java.

If you create an animation that you really like and want to share it, email me (eliso@botbox.dev) and I can add it to the generative gallery.

Leave a Comment

Your email address will not be published.