To expand on Sean's comment, you should create a separate class or set of classes to connect your physics world with your rendering.
I'm not entirely familiar with Processing, but usually it'd be something like this:
class Box2DObject{
final float PHYSICS_SCALE = 100.0;
b2Body body;
Image image;
Box2DObject(b2Body ibody, Image iimage){
body = ibody;
image = iimage;
}
void update(){
image.x = body.GetPosition().x * PHYSICS_SCALE;
image.y = body.GetPosition().y * PHYSICS_SCALE;
image.draw();
}
}
update()
is called every rendering update on each Box2DObject, after calling box2d's world.step()
method. The hard work is done by the PHYSICS_SCALE
constant defined at the top of the class. This effectively sets a ratio of 1 meter to be 100 pixels (in this case). This means that a tennis ball with a box2d diameter of 67mm, would have a display size of 6.7 pixels. Increasing/decreasing the PHYSICS_SCALE constant increases/decreases the display size.
As far as API documentation goes, most ports I have seen are largely similar to the original C++ library. The C++ API documentation can be found online at http://www.learn-cocos2d.com/api-ref/1.0/Box2D/html/index.html or in the C++ distribution which can be downloaded here https://code.google.com/p/box2d/downloads/list.
I hope this helps.