Each spring has two ends. One end is the Xpressionist group that keeps the expression for the spring (named spring1_xp and spring2_xp), the other end is the position of the attached mass, which is also an XP instance.
The expression of the spring1_xp group calculates how much force acts on its endings, and the expression of the mass_xp object calculates the resulting movement for the assigned mass.
Since this system is not visible we have attached a sphere to the mass_xp object and attached effectors - "position indicators" - to see where the ends of the springs are in our scene. The geometry of the spring is a deformed Ubershape group, that gets deformed by the distance of the spring_xp objects to the sphere/mass_xp object. To always make the spring model point to the sphere we have made the spring geometry a child of a simple IK chain with one bone that aligns the spring geometry.
|