@@ -0,0 +1,2797 @@
+package testing;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport javafx.event.ActionEvent;%0Aimport javafx.scene.control.Button;%0Aimport javafx.scene.paint.Color;%0Aimport javafx.scene.shape.Circle;%0Aimport javafx.scene.shape.Line;%0Aimport jfxtras.labs.util.event.MouseControlUtil;%0Aimport org.jbox2d.common.Vec2;%0Aimport physics.Spring;%0A%0A/**%0A *%0A * @author Christoph Burschka &lt;christoph@burschka.de&gt;%0A */%0Apublic class Fixation extends Example %7B%0A%0A    Circle anchor, pendulum;%0A    List%3CLine%3E lines;%0A    public static final int CONN = 50;%0A%0A    public Fixation() %7B%0A        super();%0A        anchor = new Circle(50, Color.RED);%0A        pendulum = new Circle(50, Color.GREEN);%0A        canvas.getChildren().addAll(anchor, pendulum);%0A        lines = new ArrayList%3C%3E();%0A        layout.setMass(anchor, Double.POSITIVE_INFINITY);%0A        MouseControlUtil.makeDraggable(anchor);%0A        MouseControlUtil.makeDraggable(pendulum);%0A        Button reconnect = new Button(%22Reconnect%22);%0A        menu.getItems().add(reconnect);%0A        reconnect.setOnAction((ActionEvent event) -%3E %7B%0A            reconnect();%0A        %7D);%0A        simulation.setFriction(5);%0A    %7D%0A%0A    private void reconnect() %7B%0A        layout.clearConnections(anchor, pendulum);%0A        lines.stream().forEach((Line l) -%3E %7B%0A            canvas.getChildren().remove(l);%0A        %7D);%0A        lines = new ArrayList%3C%3E();%0A        Spring%5B%5D s = new Spring%5BCONN%5D;%0A        for (int i = 0; i %3C CONN; i++) %7B%0A            Vec2 a = new Vec2((float) Math.random() * 100 - 50, (float) Math.random() * 100 - 50);%0A            Vec2 b = new Vec2((float) Math.random() * 100 - 50, (float) Math.random() * 100 - 50);%0A            double length = a%0A                    .add(new Vec2((float) anchor.getLayoutX(), (float) anchor.getLayoutY()))%0A                    .sub(b)%0A                    .sub(new Vec2((float) pendulum.getLayoutX(), (float) pendulum.getLayoutY()))%0A                    .length();%0A            s%5Bi%5D = new Spring(length, 100, a, b);%0A            Line line = new Line();%0A            line.startXProperty().bind(anchor.layoutXProperty().add(a.x));%0A            line.startYProperty().bind(anchor.layoutYProperty().add(a.y));%0A            line.endXProperty().bind(pendulum.layoutXProperty().add(b.x));%0A            line.endYProperty().bind(pendulum.layoutYProperty().add(b.y));%0A            lines.add(line);%0A            canvas.getChildren().add(line);%0A            line.toBack();%0A        %7D%0A        layout.addConnection(anchor, pendulum, s);%0A    %7D%0A%0A    @Override%0A    public void reset() %7B%0A        anchor.setLayoutX(WIDTH / 3);%0A        anchor.setLayoutY(HEIGHT / 2);%0A        pendulum.setLayoutX(2 * WIDTH / 3);%0A        pendulum.setLayoutY(HEIGHT / 2);%0A        reconnect();%0A    %7D%0A%0A    @Override%0A    public String getTitle() %7B%0A        return %22Relative Fixation%22;%0A    %7D%0A%7D%0A

Add an example for multiple springs.