Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

New Code: Pendulum simulator

edited January 2012 in Code Sharing Posts: 2,161

This is a simulator demonstrating pendulum dynamics, including the ability to use the "small angle approximation" or not, to have friction, and to couple the pendula.

Available as a single file or a directory.


  • Cant copy/Paste :( it just dont works... Seems to be a Bug in the iOS that keeps me apart from your (surely) Great code :(

  • Posts: 2,161

    Try downloading it in an application like GoodReader or FastKeyboard that has text editing capabilities.

  • Posts: 622

    In the one file version around line 3300, there is a bit if XML in the file

  • Posts: 622

    Actually that's closer to 3370ish to 3400

    Also it thinks font needs to be global, Maybe that would resolved if I download the tabs

  • Posts: 2,161

    The XML thing was because I accidentally included the .plist files in the concatenation. The Font thing seems to be because Codea and Linux have a different idea as to the order of files. Since the filesystem sees the extension, Font8x16.lua comes before Font.lua, but in Codea the extension is ignored and so Font.lua comes before Font8x16.lua. I've adapted my generation script to adapt for that.

    For anyone interested, it's a simple zsh command:

    for f in *.lua(:r); do
    print "\n-- File: $f\n" >> ../$PWD:t.lua
    cat $f.lua >> ../$PWD:t.lua
    print "\n" >> ../$PWD:t.lua
Sign In or Register to comment.