Consider the mass-spring system shown below. Simulate the following
system.
The red circle denotes the location of the friction less hinge, and the
blue squares denote the two masses.
Some comments
In order to complete this lab, you will have to write your code from
scratch. You are of course welcome to draw inspiration from the code
that you have worked with (and written) for other labs.
You’ll also need to come up 1) the initial conditions and 2)
simulation parameters:
initial location of the two point masses;
rest lengths of the two springs;
spring and damping coefficients for these springs; and
mass values for the two point masses.
Simulation in action
For the video that you see below:
- both masses are set to ;
- the rest lengths for both springs is ;
- the spring and damping coefficients for both springs are and , respectively; and
- the initial point masses locations are and , respectively.
Furthermore:
- The springs are not shown;
- The first spring is connected to a friction less hinge at at one end and the red mass at the
other end; and
- The second spring is connected to the red mass on one end and the
green mass on the other end.