- Like all extensions and bridges, you can turn this in as you demo module 8, OR you can demo it at an extension fest.
- This may be easier to undertake once you've seen module 10. Bridges are exercises that span multiple modules, so you may want to hold off on this until after module 10.
- If you want to start it earlier, ask questions about the superclasses, subclasses, and interfaces you find in this bridge.
- This bridge is typical of most software projects in the real world, in that you are given a mix of code that is already written with an assignment to write addiitonal code to achieve the desired functionality.
You are free to change any of the code you are given.
Long before our city began its expansion into the NFL, the pioneers of our country expanded to the West, crossing the Mississippi and braving the perils of midwestern life. As a monument to their efforts, the City of St. Louis erected Eero Saarinen's famous Arch in 1965. Its grace, beauty, and elegance have inspired poets, musicians, and artists of the past five decades.
It's time that CSE131 had its turn.
A catenary is the shape made when you suspend a string by holding its ends, and let gravity pull on the string. If you look at a telephone wire strung between two poles, the shape you see is a catenary, though not one that would necessarily garner artistic praise.
It turns out that our Arch is also a catenary, but situated upside down.
How are we to simulate an catenary acting on a string? If we look really closely at the string, we see that it is composed of a series of mass points, with each adjacent pair of masses connected by a spring.
With gravity turned off, the picture is as shown in Figure 1(a).
|Gravity turned off||After 100 iterations|
|Figure 1. A sequence of masses connected by springs, at the beginning and end of the simulation.|
Generally, the Javadoc is the best resource for understanding how the objects of this project's design relate to each other. Some notes follow but be sure to read the documentation carefully before you get started on writing code.
After letting gravity have its way with the masses, and accounting for the springs between the masses, our picture as shown in Figure 1(b).
Extra fun: Modify your solution so that the Arch starts at the bottom of the screen, and falls up instead of down.