Fun with Canvas

Canvas is undoubtedly one of the most versatile widgets of Tkinter. Given that it provides direct control over the drawing of each individual pixel, combine it with some maths and it can be used to create all sorts of neat visualizations. While the possibilities are endless, we will explore how to implement some of the important mathematical ideas in this chapter.

The key objectives for this chapter are:

  • Learning to animate with the Tkinter canvas
  • Understanding the usage of polar and Cartesian coordinates on the canvas
  • Implementing ordinary differential equations
  • Modeling simulations given a list of formulas
  • Modeling 3D graphics and studying some common transformation matrices used in 3D animation

Note that many of the code samples in this chapter requires heavy computations. However, code optimization for speed is not our first preference. The primary goal here is comprehension of the underlying concepts.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.17.137