O'Reilly logo

Tkinter GUI Application Development Blueprints - Second Edition by Bhaskar Chaudhary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3D graphics with Tkinter

Tkinter's Canvas widget provides for drawing with exact coordinate specifications. Therefore, it can be used to create all sorts of 3D graphics. Furthermore, we have already seen the animation abilities of Tkinter. We can apply these abilities to also animate in 3D.

Let's create a simple application where we create a cube in the center. We add event listeners to rotate the cube on mouse events. We also make a small animation in which the cube keeps rotating by itself when no mouse intervention occurs. In its final form, the application would look as follows (8.13_3D_graphics.py):

Transposing or unzipping can be done ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required