jessicabartley/computational-physics — pull request #1 by gsong (2014-04-13 14:13:00+00:00)
Title: Simplified and clarified project 6 code

1. Changed the system data structure, instead of a dictionary of three
separate lists:

```
{
'time': [a, b, c, …],
'angle': [a, b, c, …],
'velocity': [a, b, c, …],
}
```

We use a list of node elements:

```
[
{'time': a, 'angle': a, 'velocity': a},
{'time': b, 'angle': b, 'velocity': b},
{'time': c, 'angle': c, 'velocity': c},
…
]
```

2. Instead of relying on global constants (e.g. `DRIVING_FREQUENCY`) to exist
magically throughout the program, explicitly pass them in to functions and
contain their use in in `main()` only.

3. There's no need to create a `time_sequence`, just so you can loop over it
to create the associated angles and velocities. Just loop once and generate
all three values.

4. The major inefficiency was actually creating the entire system three times
for each loop, that's `TIME_STOP * 3`! Let's just create the system once
and loop over that.