Computational Model

Drag to rearrange sections
Rich Text Content

I took the PMPM computational model program and made some minor modifications so that we were able to use the computing  power of the laptops to do the work for us! I quickly removed the visual aspect of the program (with your help of course!) and deleted other unneeded portions of code. Then, I set up the first while loop such that after it ran it's simulation, if the final x component of the position vector was greater than my desired final x position, it would add .1 to theta and do it again (I made sure that this would be the case by initializing theta to 30 degrees, which I knew would launch the ball too far). Then, once the program went .1 past the desired theta, I had it dial theta back down but this time by .01. This gave us one decimal point further than we could measure on the launcher, so it was a quite accurate method. Then, to find when to launch the ball based on the position of the buggy, I used the calculated time of the launch to figure out how far the buggy would go in that amount of time, and subtracted that from the desired final x position and had the program print everything out for me!

rich_text    
Drag to rearrange sections
Rich Text Content
rich_text    

Page Comments