Python4Kids New Tutorial: Being Animated
Jun 27, 2012, 03:00 (0 Talkback[s])
(Other stories by Brendan Scott)
How to Help Your Business Become an AI Early Adopter
In the last tutorial we looked at the Canvas widget from Tkinter and we also had a look at the concept of cartesian coordinate systems. In our example we could identify specific pixels by counting across and down from the top left of the canvas (ordinarily cartesian systems count left and up). We also bound the motion event to the canvas and used it to display the current coordinates of the mouse in the canvas. The reason we did this is because to draw anything on the canvas you need to know the coordinates of where it is to be drawn. In this tutorial we draw a line on the canvas (!!) and animate it so that it follows the mouse.