New Code: Pendulum simulator

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.

http://www.math.ntnu.no/~stacey/HowDidIDoThat/iPad/Codea.html

Available as a single file or a directory.

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

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

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

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

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 "\
-- File: $f\
" >> ../$PWD:t.lua
cat $f.lua >> ../$PWD:t.lua
print "\
" >> ../$PWD:t.lua
done