• anonymous
Help please! I'm asked to write a python program to calculate the trajectory of a projectile. I've started writing the program but I'm stuck at the plotting part. I don't know how to store the trajectory points and plot them on graph.
Computer Science
  • Stacey Warren - Expert
Hey! We 've verified this expert answer for you, click below to unlock the details :)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
  • katieb
I got my questions answered at in under 10 minutes. Go to now for free help!
  • e.mccormick
The answer to that depends o a lot of things. Are you using one of the math packages to do this and does it have a plotting part built in? Are you using a graphics package? So on and so forth. If you are just using Python itself, that may be the issue. Without a library to do the work, you will have to start from scratch and that is a big deal. You may want a basic graphics or computational library that has plotting built in. Then you just need to store you data in a way that is appropriate for feeding to that that package.
  • eSpeX
On a basic level you could create two arrays, xArray and yArray, of a length equal to the number of points you're interested in using. Once you populate your arrays you will have a collection of ordered pairs that you can call at will.

Looking for something else?

Not the answer you are looking for? Search for more explanations.