Sat, 22 Sep 2007
Cable Physics: Ideal Elastics, Testing for Catastrophe
« The Tricky Physics of Rigid Bars, Developing the Arrow Class | Main | Physics Feedback, Visitors, and Graphics Soon » Posted by at 4:12 PM in /
This podcast episode is about completing the Physics class by adding cable physics to complement the bar physics that I had already built. It may well sound a bit chaotic because the process is much like stumbling blind through a forest, and while developing I bumped my head a number of times.
We're still in the deferment-of-gratification stage of the project because there are no flashy graphics to play with. Instead I'm just trying to get a handle on the numbers and the most basic principles I need. Everything is happening in the TestTensegrity class (see below). The interesting part is that the test is now cranking up the tension until a catastrophe occurs.
Last time we explored rigid bar physics, but this time the cables have to be defined. I started with cables that has a given (desired) span value but then the cables can be "slack" (when they're shorter than they want to be) and that introduces issues I would like to avoid. So I broke new ground again by making the cables have a desired span of zero by-definition. This way they really only can pull.
To do these tests, first the Factory class had to be expanded to create tensegrities that contained cables. There are two so far: a cross (two bars with four cables around, like a kite, diamond shaped) and a 3D cross (three bars perpendicular to each other with an "octahedron of tension" around them, like the X-Y-Z axis).
The Physics class is now furnished with a couple parameters to determine how it behaves: gravity and tension. Gravity is simple, just a pull downward, and during this phase the gravity has been switched off (in the tests). The value we are interested in is tension, which is multipled by the actual length of the cable to determine the force applied to the movement arrows of the joints at the end of cables. When the cable exceeds a given length, a StretchException is thrown!
Also, a new addition is the idea of quadratic drag. In the past I have always used linear drag resembling slow movement through a fluid, but quadratic drag resembles rapid movement through a fluid. The difference is that now the brakes are pushed a lot harder when the joint is travelling fast. Imagine pushing your hand through water.. the harder you push the more it brakes.
I hope you enjoy the audio.
- TestTensegrity.java - central role right now
- Factory.java - creating 2d and 3d crosses
- Interval.java - no more span
- Bar.java - has the span now
- Physics.java - cable physics!
Technorati Tags: evolution tensegrity java darwin code