[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Python Trajectory Module?

Greg Taylor

12/31/2007 3:41:00 PM

Greetings,

I was wondering if there was a python Module/Library out there that
handles some trajectory/physics stuff like moving an object along a
straight path in an X,Y 2D (or 3D) plane or calculating parabolic
arcs. I'd really settle for just the moving of an object along a
straight line.

I know it's not terribly difficult to implement this on your own, but
I'd rather not re-invent the wheel if someone else already did a good
job of it the first time.

Thanks!
5 Answers

Diez B. Roggisch

12/31/2007 5:20:00 PM

0

squishywaffle@gmail.com schrieb:
> Greetings,
>
> I was wondering if there was a python Module/Library out there that
> handles some trajectory/physics stuff like moving an object along a
> straight path in an X,Y 2D (or 3D) plane or calculating parabolic
> arcs. I'd really settle for just the moving of an object along a
> straight line.
>
> I know it's not terribly difficult to implement this on your own, but
> I'd rather not re-invent the wheel if someone else already did a good
> job of it the first time.

Maybe the ODE library and it's Python-wrapping PyODE are useful for you.

Diez

Paul McGuire

12/31/2007 5:22:00 PM

0

On Dec 31, 9:40 am, "squishywaf...@gmail.com"
<squishywaf...@gmail.com> wrote:
> Greetings,
>
> I was wondering if there was a python Module/Library out there that
> handles some trajectory/physics stuff like moving an object along a
> straight path in an X,Y 2D (or 3D) plane or calculating parabolic
> arcs. I'd really settle for just the moving of an object along a
> straight line.
>
> I know it's not terribly difficult to implement this on your own, but
> I'd rather not re-invent the wheel if someone else already did a good
> job of it the first time.
>
> Thanks!

Try VPython.

-- Paul

Scott David Daniels

12/31/2007 8:35:00 PM

0

squishywaffle@gmail.com wrote:
> Greetings,
>
> I was wondering if there was a python Module/Library out there that
> handles some trajectory/physics stuff like moving an object along a
> straight path in an X,Y 2D (or 3D) plane or calculating parabolic
> arcs. I'd really settle for just the moving of an object along a
> straight line.
>
> I know it's not terribly difficult to implement this on your own, but
> I'd rather not re-invent the wheel if someone else already did a good
> job of it the first time.
>
> Thanks!

If you combine the advice of Diez B. Roggish and Paul McGuire:
Download and install VPython.
Download and install PyODE.
Get and run VPython Contributed program:
http://www.vpython.org/contributed/visua...
which shows a weight on a hinge with another attached to the ball;
quite believable dynamics. Although the code is really not
carefully written, looking at it may give you a sense of how
little work you'll have to do to get some physics action going.

Dennis Lee Bieber

12/31/2007 11:18:00 PM

0

On Mon, 31 Dec 2007 07:40:41 -0800 (PST), "squishywaffle@gmail.com"
<squishywaffle@gmail.com> declaimed the following in comp.lang.python:


> I know it's not terribly difficult to implement this on your own, but
> I'd rather not re-invent the wheel if someone else already did a good
> job of it the first time.
>
Sounds like the typical stuff one would find in a game... and
probably, therefore, found in a book on game programming... Perhaps one
of these:
http://www.amazon.com/s/ref=nb_ss_gw/105-4015878-8034858?url=search-alias%3Daps&field-keywords=programming+games+python&x...
--
Wulfraed Dennis Lee Bieber KD6MOG
wlfraed@ix.netcom.com wulfraed@bestiaria.com
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: web-asst@bestiaria.com)
HTTP://www.bestiaria.com/

Stef Mientki

1/2/2008 12:08:00 AM

0

squishywaffle@gmail.com wrote:
> Greetings,
>
> I was wondering if there was a python Module/Library out there that
> handles some trajectory/physics stuff like moving an object along a
> straight path in an X,Y 2D (or 3D) plane or calculating parabolic
> arcs. I'd really settle for just the moving of an object along a
> straight line.
>
> I know it's not terribly difficult to implement this on your own, but
> I'd rather not re-invent the wheel if someone else already did a good
> job of it the first time.
>
> Thanks!
>
Depends on how detailed / graphical you've in mind.
You might be interested in this:

http://oase.uci.kun.nl/~mientki/data_www/pylab_works/pw_animations_screen...

I've put a scanned version of my written notes about the trajectory example.
No need for ODE in my very simple mind, because the functions describing
the solution are already known.

If you want to view the demos / animations,
be sure to view the demo at the bottom first,
because it explains the philosophy behind the program.
Only 1 major feature is not described in this demo (because when I made
the demo I had no solution for it, now I think I have)
and that is :
an integrated help / instruction / assignment / fill-in forms /
judgement, specially for educational puposes.

The program is not yet released,
because I'm now cleaning it up and debugging it (by making demos ;-)
cheers,
Stef