Page 1 of 1

Python and Equations

Posted: Fri Nov 01, 2013 11:28 am
by Resonator
Hi All,

My first post here, have been reading and searching through the forums (and google) but have not found an answer I'm looking for.

I am building a trajectory simulator with the BGE, which will be the basis of a larger project that I will be moving on to.

I have been going through a few basic Python tutorials so far, and am getting somewhere with regards to basic scripting.

I would like to know if this below is possible to do with Python and Blender.

Image

Sorry image is a png, so not displaying properly, direct link here http://upload.wikimedia.org/math/9/8/9/ ... 9b2806.png

And website http://en.wikipedia.org/wiki/Trajectory ... 28x.2Cy.29

Where the user would input the values in a UI field for v, x and y and the answer (theta) would be displayed.

I have seen pure quadratic equations being done for Python, can't find anything about how to get it right in the BGE.

Many thanks and regards,
Chris

Posted: Fri Nov 01, 2013 6:51 pm
by stiv
Math is math. You can do it in Python. But for heavy lifting, you might want to look into Numpy. Or even Scipy if you are feeling exotic.

Posted: Mon Nov 04, 2013 7:19 am
by Resonator
Many thanks stiv, I will look into what you have posted. Much appreciated!