Example 1 - rectangle.tao

This script creates a rectangular sheet, locks all four corners and then applies a short impulse at a point (x=0.1,y=0.1). This impulse consists of a force linearly changing from a value of 30 to 0 over a 1ms interval.

    Audio rate: 44100;
        
    Rectangle rectangle(300 Hz, 400 Hz, 20 secs);
        
    Init:
        rectangle.lockCorners();
        ...
        
    Score 5 secs:
        At 0 secs for 1 msecs:
            rectangle(0.1,0.1).applyForce(linear(30,0));
            ...
        ...


©1999,2000 Mark Pearson m.pearson@ukonline.co.uk April 30, 2000