We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProcessing DevelopmentLibraries,  Tool Development › New library: Fisica a JBox2D wrapper
Page Index Toggle Pages: 1
New library: Fisica a JBox2D wrapper (Read 2807 times)
New library: Fisica a JBox2D wrapper
Mar 22nd, 2010, 5:50am
 
Here you have yet another physics library for Processing.  It is a wrapper around JBox2D.

These are some of the features:
  • Several kind of bodies (Circles, rectangles, lines, polygons, blobs,...)
  • Several kind of joints (Distance, revolute, prismatic, gears, ...)
  • All bodies can be grabbed by the mouse (use FBody.setGrabbable() to change that)
  • Contact events are thrown by the library, you can implement the following functions in your sketch:
    • void contactStarted(FContact c) {}
    • void contactEnded(FContact c) {}
    • void contactPersisted(FContact c) {}
  • Bodies can be added or removed from the world during contact events
    - Polygon bodies are very easy to make (look at the examples)

You may find the doc and examples, as well as the lib itself at:
http://www.ricardmarxer.com/fisica

In the coming days I will be publishing a tutorial since I'm using this library in one of my Processing courses.  I want to thank the Jean-Maxime Couillard for http://pphys2d.jmcouillard.com/, because his API was very inspiring. Finally an enormous thanks to the guys that made http://www.jbox2d.org which is the real thing happening behind this library.
Re: New library: Fisica a JBox2D wrapper
Reply #1 - Mar 22nd, 2010, 6:21am
 
pretty cool, thanks for building this wrapper. i played arround whit jbox2d and i guess this makes it alot easier
Re: New library: Fisica a JBox2D wrapper
Reply #2 - Mar 25th, 2010, 9:37am
 
I have update the web with 3 more examples and a new version of the lib:
  • Contacts: Shows how to detect when and where contacts happen
  • ContactRemove: Shows that we can remove bodies when contacts happen
  • Bubbles: Shows how to easily create blobs

Now all bodies can be grabbed (including static bodies), however blobs can only be grabbed at their edges.
In this new version there is a fix for the Prismatic Joint and one that fixes removing bodies while they are grabbed.
This last one fixes the Polygons example where you can draw bodies and remove hovered ones by pressing Backspace.

cheers,
ricard
Re: New library: Fisica a JBox2D wrapper
Reply #3 - Apr 8th, 2010, 10:03am
 
Here is another example of something I'm working on using Fisica.

Rompecabezas
Page Index Toggle Pages: 1