Friday, February 28, 2014

Practice with Python Graphics

 With most graphical programs, the first element to construct would be the graphic settings: which is set up through GraphWin('title'). It is convenient to provide this a short variable 'win' as you would be using it consistently throughout your program.

 With this program, syntax was the most important element. This was because I was primarily just formatting a simple graphic window, that require no input from the user, nor identify any algorithm. The coordinant system works the same way as you'd expect from a regular (x,y) graph. In the of Python, (x,y) could only have become idenfied by the first quadrant of the classical graph interface. Hence, the positive values. Circles are expressed through their origin, followed a length of their radius. A rectangle works the same way as would a line. Both acknowledge two points on the graphic interface, and only differ in their syntax: 'Rectangle' and 'Line'.

No comments:

Post a Comment