TOC

Day 17: Basic Pendulums

Repo for Day 17

Following along with Coding Challenge #160(starting code)

Continuation of Note From Yesterday: He did not use recursion for the springs, which makes sense because he wrote his spring object as two particle objects and a force between them, not a thether with an origin point and an end object, like with the pendulum. By having a broken out particle object it is easier to sum the forces from the global frame of refences all at once (no cosine on the gravity). So easy I diverged from the original by the end and just made a spring force stand alone object without the particles.

Hover the mouse over a sketch to make it run.

  1. 01-simple-start-vector
  2. 02-spring-start-objects
  3. 03-chained-springs
  4. 04-chained-springs-refined