/** * Anchors and the bridge * * by Ricard Marxer * * This example shows the use of anchors and distance joints in order * to create a bridge. */ import fisica.*; float frequency = 5; float damping = 1; float puenteY; FBody[] steps = new FBody[20]; FWorld world; int boxWidth = 400/(steps.length) - 2; void setup() { size(400, 400); smooth(); puenteY = height/3; Fisica.init(this); world = new FWorld(); FCircle bola = new FCircle(40); bola.setPosition(width/3, puenteY-10); bola.setDensity(0.2); bola.setFill(120, 120, 190); bola.setNoStroke(); world.add(bola); for (int i=0; i