Python and Equations

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
Resonator
Posts: 0
Joined: Fri Nov 01, 2013 11:01 am
Location: South Africa

Python and Equations

Post by Resonator » Fri Nov 01, 2013 11:28 am

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

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv » Fri Nov 01, 2013 6:51 pm

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.

Resonator
Posts: 0
Joined: Fri Nov 01, 2013 11:01 am
Location: South Africa

Post by Resonator » Mon Nov 04, 2013 7:19 am

Many thanks stiv, I will look into what you have posted. Much appreciated!

Post Reply