I'm kinda doing the same thing at uni right now. If you have a good understanding of maths and dynamics it shouldnt be too hard to port into C++ to do what you want. as for manipulating matrices, just create a method that takes in 2 2D arrays and creates a new one by manipulating data from the two inputs... But in opengl you really don't need to do this. demonstrating it in action should show you know how it works anyway. you should look at writing physics simulations. i.e gravity with air resistance, projectiles, proper collision detection etc.