Sat, 29 Sep 2007
Physics Feedback, Visitors, and Graphics Soon
« Cable Physics: Ideal Elastics, Testing for Catastrophe | Main | Tippytoes into OpenGL » Posted by at 12:06 PM in Code
Some interesting feedback came in since last time, both about the physics ideas that I talked about last time.
Sven Heinz was concerned that the behavior when one end of a bar goes underground due to gravity the rotation is being cancelled out. Also he thinks that slack should exist and that evolution should be able to eliminate it by natural selection. I suppose he's right about the rotation, although he doesn't really suggest a solution. The second point remains to be seen, but I'd like to find out what works by trying it out. Later we can try a number of things.
I think it might be interesting to have the floor be not so absolute at Z=0, but rather to make it kind of cushion, becoming more "arresting" the deeper you go, perhaps quite extremely, but not the absolute above-below difference we have now.
Some other very nice encouraging email from Matt Dick, who enjoys the podcast and suggests that overstretched cables could just "blow up". The way it is right now is they throw a StretchException, and the consequences of that is something that has to be built. We could delete the stretched cable, or lengthen it, or anything else. To be determined. It could even be used as an anti-fitness factor rather than something as absolute as deletion. Matt is also pleased with the quadratic drag, and seems to also think in terms of a viscosity idea in the floor rather than absolute Z<0 behavior.
Anyway, the main focus of this podcast is the things that have to be added to the code getting ready for visualizing things with OpenGL, using JOGL. Certain coding design patterns are a lovely sight to behold when they appear to be in their native habitat, and the one that I will introduce now is the Visitor which will allow the nucleus of the "Tensegrity" class stay intact and not grow more complex while any number of visitors pass through the tensegrity, from simple ones to very tricky ones, to do their magic.
Here's the sound to go with the text and the code. Stay tuned, because next time we will see something graphical for the first time!
- Bar.java & Cable.java - look at the little visitors that crept in!
- Tensegrity.java - admit visitors, who will have their way with the tensegrity
- PointOfView.java - a new package, a new challenge: perpendicular arrows
- Arrow.java - now with cross product
Technorati Tags: evolution tensegrity java darwin code opengl visitor