CAST workshop manual

Page 134

Exercise Add a SPRINGS FROM LINE component to the canvas. Connect our lines to the Connection input - this will tell kangaroo how construct the springs. If we also connect the lines to the Rest Length input of the springs component, kangaroo will use the Length of the line as the rest length. This simulates rigid behaviour as the two ends of the spring will attempt to maintain the same distance apart throughout the simulation.

If we connect a number to the rest length input that is LESS than the original length of the spring, we will be simulating tensile behaviour (elastic bands, stockings, membranes etc). Lengths over the original length cause networks to explode and reorganise. For now, we are not interested in the remaining inputs, so connect the output from the spring object to the force objects input of the kangaroo component.

(KANGAROO/FORCES/SPRINGSFROMLINE)

Lastly we are going to anchor the end points of our original curves to prevent the springs flying all over the place. To do this we use an END POINTS component, with a REMOVE DUPLICATE POINTS component to avoid overlapping points that would otherwise break the simulation. We can connect the points to the ANCHOR POINTS input of the physics engine.

Now we are ready to run the simulation. We want to see Kangaroo continuously update, so to do this create a TIMER component, right click it and set its interval to 20ms, then drag and drop from its on/ off indicator on the right of the component onto the Kangaroo Physics component. This makes sure that the timer only updates the physics engine, not everything else in our definition.

(KANGAROO/UTILITIES/REMOVEDUPLICATEPTS) (CURVE/ANALYSIS/ENDPOINTS)

The timer can make everything run VERY slowly, so you can turn it on and off in the windows task bar if something goes awry. You can double click your toggle to set it to False in order to start running the simulation. Setting it to True will reset. Our original curves are now springs - try moving a control point in rhino and see what happens while the simulation is running.

(PARAMS/SPECIAL/TIMER)

134


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.