There's a new version of the Tensegrity Application online for you to take a look at. You will notice that there's text at the top describing how long the bars are, and if you watch you will see that every new tensegrity that appears is smaller than the previous one. The nice effect of getting smaller is that the cable forces really start to dominate eventually, while they are relatively weak in the beginning. Think about this.

I've been busy building a rendering where the bars appear to be substantial things, shaped a bit like cigars, while the cables are still appearing as blue lines. To do this and keep things flexible I've taken the bar and cable painters out of the view class, and made them separate little classes. Below you will find links to the SphereBarPainter and the LineCablePainter.

Also, while setting up the visualization of the new tensegrity triangle unit from last time (three bar tensegrity) it became clear that we need a good way to maintain the camera position. For this I created a class Vehicle, the source of which is also linked below. The Vehicle takes the PointOfView and manipulates it during every tick of the clock, trying to move it towards focusing on an ideal focus location and maintain an ideal distance from that focus. In the view class, all we have to do is call its "adjust" method and it will push the PointOfView one more step in the right direction.

You should be able to see the results of this in how you find yourself following the tensegrity as it bounces around in the new version online. You will also see the lovely three-bar tensegrity that is created by the little factory method from last time.

I'm afraid I've also been doing quite a bit of tweaking to figure out how to make the gravity and the floor work in an good-looking way. Here is the relevant code from Physics.java if you're interested:


        float downward = gravity*mass;
        float localDrag = joint.velocity.quadrance() * drag;
        float damping = DAMPING;
        float height = joint.location.z;
        if (height < BUFFER_ZONE) {
            float antigravity = downward * ANTIGRAVITY_FACTOR;
            float highDamping = damping * DAMPING_FACTOR;
            float killXY;
            if (height > -BUFFER_ZONE) {
                // 1 at top, 0 at bottom
                float above = (height + BUFFER_ZONE)/(BUFFER_ZONE*2);
                // 0 at top, 1 at bottom
                float below = (BUFFER_ZONE - height)/(BUFFER_ZONE*2);
                downward = downward * above + antigravity * below;
                damping = damping * above + highDamping * below;
                killXY = above;
            }
            else {
                downward = antigravity;
                damping = highDamping;
                killXY = 0;
            }
            momentum.x *= killXY;
            momentum.y *= killXY;
        }
        momentum.z -= downward;
        momentum.scale(1 - localDrag);
        momentum.scale(1 - damping);
        .....

As you can see I've added in damping (just reduces momentum, regardless of velocity) and also added functionality to kill the X and Y momentum when a joint goes below the floor (anti-slipperiness). Other than that, the gravity gradually gives in to the antigravity the further down you are. It's fun to play around with physics, but I realize that I will eventually have to settle on a physics strategy that I can defend well.

In this episode of the podcast I talk about this stuff, and I read a little section of Bucky Fuller's book "Synergetics 2". I received this book in the mail from the man who co-authored it with Fuller himself Ed Applewhite with the inscription "For Gerald de Jong - in gratitude for his imaginative amplification of Fuller's ideas as found in this work".