interactive graphics?

E

Elaine Jackson

I'm intrigued by the pedagogical possibilities of those Java applets where you
can manipulate an image by mouse-dragging. Is there any prospect of doing
something similar with Python? And if so, where might one start?
 
D

Doug Holton

Elaine said:
I'm intrigued by the pedagogical possibilities of those Java applets where you
can manipulate an image by mouse-dragging. Is there any prospect of doing
something similar with Python? And if so, where might one start?

Do you mean like an applet that lets you draw? Or an applet that takes
a pre-existing image and you can alter it (like make it fuzzy or draw
over it)? Or an applet that lets you add shapes and move them around?

There isn't as much on the Python side as Java, but you can do all these
in Python.

If you are using Windows, I would recommend starting off by trying out
wxPython (http://www.wxpython.org/) and running the demo.

If you are wanting to do something like a drawing or image altering
application, see in addition to the demo:
http://wiki.wxpython.org/index.cgi/WorkingWithImages
http://www.pythonware.com/products/pil/

If you are wanting something that can do interactive structured
graphics, where you can add shapes and drag them around, see for
example: http://bellsouthpwp.net/p/r/prochak/pyxel.html

And also check out http://pygame.org/ and http://www.nongnu.org/pygsear/
 
A

Arthur

I'm intrigued by the pedagogical possibilities of those Java applets where you
can manipulate an image by mouse-dragging. Is there any prospect of doing
something similar with Python? And if so, where might one start?


www.vpython.org

The demos should give you a good idea of some of the possiblities.
Its pedagogical possibilities are being well explored in the physics
classroom, but there are many other ways to go with it.

My own effort is PyGeo, which is a geometry laboratory using Vpython
as the rendering backend. It is in the class of "dynamic geometry"
applications. Except, as opposed to the others of which I am aware,
it lives in a spacial, rather than flat world. Oh, and its in Python.

http://home.netcom.com/~ajs

There are parts of its architecture I think are cool.

Except that its mouse functioning is broken by the brand new VPython
release (which is the first Boost based release). I suspected the
new VPython might break PyGeo, so was holding off on a new release
until the VPython release. Now I have no excuse.

Art
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,665
Latest member
salkete

Latest Threads

Top