I don't think I'm allowed to post large sections of the code online. Sorry about that. The program is a disgusting mess anyway. The student who wrote it did not have any formal guidance with programming with Maple, so it is written without proper style and structure; I am similarly lost. Difficulty finding learning materials isn't helping the matter.
Let me give an example of a performance issue I experienced. In order to test the speed of Maple, I extracted a very small piece of my finished program and ran it. I'll post an excerpt here.
(By the way, note that I have little to no idea of how to program in Maple. You are more than welcome to criticize.)
pos := Matrix(3, 241); vel := Matrix(3, 241); angVel := Matrix(3, 241);
step = 0.1;
pos(1, 1) := 2; pos(2, 1) := 0; pos(3, 1) := 5; #arbitrary values
vel(1, 1) := 13; vel(2, 1) := 0; vel(3, 1) := 9;
UpdatePosition := proc (i)
pos(1, i) := pos(1, i-1)+vel(1, i)*step; #x position
pos(2, i) := pos(2, i-1)+vel(2, i)*step; #y position
pos(3, i) := pos(3, i-1)+vel(3, i)*step #z position
for i from 2 to 241 do
This small section of code took a couple seconds to execute. The final program should have thousands of more computations that this program. If the execution time increased linearly, then the program would easily take a minute or more to run.
P.S. Are there code tags I can use?