News for hackers. Stuff that matters.
Re:15 uncoupled simple pendulums of increasing lengths dance... by gautier on Saturday August 27, 2011 @08:48AM (#2931351)
You wish for it, HTML5 delivers. http://pepsdev.com/pendulums/
Re:15 uncoupled simple pendulums of increasing lengths dance... by city41 on Saturday August 27, 2011 @09:19AM (#2931394)
A slight tweak to draw the pendulums too makes the simulation look much nicer:

      function draw (Ls, t, h) {
         // only for in the program, needed?
        for (var i = 0; i < Ls.length; i++) {
          ...
          ctx.lineTo(h * L, 0)
          ctx.arc(h * L, 0, 6, 0, 360)
          ctx.stroke()
          ctx.fill()
          ...
        }
      }
to do it right you really need to start another path, but this works fine in Chrome (looks little wonky in Firefox)
Re:15 uncoupled simple pendulums of increasing lengths dance... by gautier on Saturday August 27, 2011 @09:32AM (#2931420)
thanks, that's much nicer indeed.
Re:15 uncoupled simple pendulums of increasing lengths dance... by dmvaldman on Saturday August 27, 2011 @12:50PM (#2931864)
awesome! at 60 seconds my theory is confirmed! thanks
Re:15 uncoupled simple pendulums of increasing lengths dance... by a3_nm on Saturday August 27, 2011 @06:01PM (#2932653)
Don't miss the moiré patterns in the wires.