Excercise: 3D graphics - simple cube • Program an application that does the following: 1. By default a cube should spin around all 3 axis at the same time 2. By pressing the down arrow key it should spin only around the x-axis 3. By pressing the right arrow key it should spin only around the y-axis 4. By pressing the left arrow key it should spin only around the z-axis 5. By pressing the up arrow key it should spin again around all 3 axis at the same time as in start-up.
Example file: ex_3d_cube_simple.py Description: ex_3d_cube_simple_descr.py
Python for S60 can display 3D graphics via the modules gles and glcanvas. Whereas the gles module provides Python bindings to OpenGL ES 2D/3D graphics C API, the glcanvas module provides a UI control for displaying OpenGL ES graphics. OpenGL ES is a standard defined by Khronos Group (www.khronos.org). Python for S60supports OpenGL ES version 1.0 from Series 60 version 2.6 onwards, and OpenGL ES version 1.1 which requires Series 60 version 3.0 or newer. Due to lack of space we can not tell details here, but please check the PyS60 API documentation on how to use the 3D graphics functionalities.
|
|
|
Menu Copyright (c) 2007 Jurgen Scheible |
|