Re: [Tutor] newbie graphing question

2008-07-29 Thread Peter Petto
Title: Re: [Tutor] newbie graphing
question


Thanks so much to everyone who helped me with my gui/drawing
request. I appreciate the responses from Alan, bhaluu, James, and
Pierre, and am exploring all the suggestions I received.

At the moment, I have my immediate needs satisfied with Tkinter
-- easiest because it was already present on my Mac, Windows, and
Ubuntu installations.

Alongside the recommendations, I came across the the Python Imaging
Library, which I thought might also be worth mentioning in this
thread. It's documentation is the best click with my
brain; but I haven't tried it yet because installation on Mac 
Linux means I need to work from source; which I haven't been brave
enough to try, yet.

I am going to try my project with all the libraries suggested,
and if results vary -- I'll post the results.

Thanks again!

 Peter++


-- 

===

Peter Petto [EMAIL PROTECTED]
Bay Village, OH tel: 440.249.4289


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] newbie graphing question

2008-07-27 Thread Peter Petto
I'm about to try some Python programming for drawing simple geometric 
pictures (for math classes I teach) and was hoping to get some advice 
that will send me off in the best direction.


I want to write programs that can draw figures with commands akin to 
point(x,y) to draw a point at coordinates (x,y), or segment 
(x1,y1,x2, y2) to draw a segment between points (x1, y1) and (x2, y2)?


I'd appreciate recommendations as to the best facility or library to 
use to this end. I primarily use a Mac, but my students primarily use 
Windows.


I'd love to hear any and all pointers or comments. Thanks!


--
===

Peter Petto [EMAIL PROTECTED]
Bay Village, OH   tel: 440.249.4289
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] newbie graphing question

2008-07-27 Thread bhaaluu
On Sun, Jul 27, 2008 at 8:40 AM, Peter Petto [EMAIL PROTECTED] wrote:
 I'm about to try some Python programming for drawing simple geometric
 pictures (for math classes I teach) and was hoping to get some advice that
 will send me off in the best direction.

 I want to write programs that can draw figures with commands akin to
 point(x,y) to draw a point at coordinates (x,y), or segment (x1,y1,x2, y2)
 to draw a segment between points (x1, y1) and (x2, y2)?

 I'd appreciate recommendations as to the best facility or library to use to
 this end. I primarily use a Mac, but my students primarily use Windows.

 I'd love to hear any and all pointers or comments. Thanks!
 --
 ===
 Peter Petto [EMAIL PROTECTED]
 Bay Village, OH   tel: 440.249.4289


Hello Mr. Petto,

I'd recommend the PyGame library. PyGame is a Python wrapper around the
extraordinary SDL library. For an example program of what you might be looking
for, take a look at:

http://www.cs.iupui.edu/~aharris/pygame/ch05/paint.py

The whole site has a lot of Python/PyGame examples:
http://www.cs.iupui.edu/~aharris/pygame/

Andy Harris is a CS professor at Indiana University-Perdue University
Indianapolis,
and is the author of several books, including Game Programming
[ISBN-13: 978-0-470-06822-9], which is a fairly complete introduction
and tutorial
for PyGame.

Happy Programming!
-- 
b h a a l u u at g m a i l dot c o m
Kid on Bus: What are you gonna do today, Napoleon?
Napoleon Dynamite: Whatever I feel like I wanna do. Gosh!
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] newbie graphing question

2008-07-27 Thread Alan Gauld

Peter Petto [EMAIL PROTECTED] wrote

I want to write programs that can draw figures with commands akin to 
point(x,y) to draw a point at coordinates (x,y), or segment 
(x1,y1,x2, y2) to draw a segment between points (x1, y1) and (x2, 
y2)?


Most GUI toolkits will have a Canvas widget or similar that allows
drawing at that level. Also the standard turtle module might be
helpful with supoport for turtle graphics. Finally there are Python
plotting libraries that can be used for graphing and charts

However the GUI toolkits have the big disadvantage that you have to
build a GUII and all the controls before you can use the Canvas. That
migt not be what you want. Or you may want to build a basic framework
that your students can start from.

I'd appreciate recommendations as to the best facility or library to 
use to this end. I primarily use a Mac, but my students primarily 
use Windows.


Standard Tkinter or wxPython both work on the Mac.

It depends on whether you want to teach graphics programming or
just graphics for data presentation. If the latter you are probably 
better

off with a standard spreadsheet like Excel.

HTH,

--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 



___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] newbie graphing question

2008-07-27 Thread arsyed
On Sun, Jul 27, 2008 at 8:40 AM, Peter Petto [EMAIL PROTECTED] wrote:
 I'm about to try some Python programming for drawing simple geometric
 pictures (for math classes I teach) and was hoping to get some advice that
 will send me off in the best direction.

 I want to write programs that can draw figures with commands akin to
 point(x,y) to draw a point at coordinates (x,y), or segment (x1,y1,x2, y2)
 to draw a segment between points (x1, y1) and (x2, y2)?

 I'd appreciate recommendations as to the best facility or library to use to
 this end. I primarily use a Mac, but my students primarily use Windows.

 I'd love to hear any and all pointers or comments. Thanks!



Take a look at PiScript:

http://www.math.ubc.ca/~cass/piscript/docs/piscript.html
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] newbie graphing question

2008-07-27 Thread Pierre Dagenais

Peter Petto wrote:
I'm about to try some Python programming for drawing simple geometric 
pictures (for math classes I teach) and was hoping to get some advice 
that will send me off in the best direction.


I want to write programs that can draw figures with commands akin to 
point(x,y) to draw a point at coordinates (x,y), or segment (x1,y1,x2, 
y2) to draw a segment between points (x1, y1) and (x2, y2)?


I'd appreciate recommendations as to the best facility or library to use 
to this end. I primarily use a Mac, but my students primarily use Windows.


I'd love to hear any and all pointers or comments. Thanks!



Hi Peter,
I'm just trying to do the same, draw points and lines without having to 
spend the next six months learning a GUI environment and then finding 
I've been learning the wrong one all this time. Then I stumbled on these 
pages at py4fun, it's a quick and dirty introduction to the basics of 
Tkinter, just a few commands and you're in business. Hope that is what 
you're looking for,

http://ibiblio.org/obp/py4fun/gui/tkPhone.html
http://ibiblio.org/obp/py4fun/wave/wave.html




___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor