Multi-Platform Graphics Programming with Kivy, 1st ed.
Basic Analytical Programming for 2D, 3D, and Stereoscopic Design

Authors:

Language: English

Approximative price 58.01 €

In Print (Delivery period: 15 days).

Add to cartAdd to cart
Publication date:
370 p. · 15.5x23.5 cm · Paperback

Modern science requires computer graphics models to provide realistic visual renderings. Learning the appropriate programming tools for 2D and 3D modeling doesn?t have to be so difficult. This book reviews the best programming tools to achieve this and explains how to apply them to mobile platforms like Android. 

Multi-Platform Graphics Programming with Kivy provides a straightforward introductory approach for designing 2D, 3D, and stereoscopic applications, using analytical equations from vector algebra. Throughout the book you?ll look closely at this approach and develop scenes in Kivy, taking advantage of powerful mathematical functions for arrays by NumPy for Python. 

Unbuntu is used to develop the programs, which allows you to easily convert to Android platform. Each chapter contains step-by-step descriptions on each subject and provides complete program listings.


What You?ll Learn
  • Work with Kivy, a modern, powerful multi-platform graphics system
  • Convert and run programs on Android devices
  • Program, fill faces, and rotate 2D and 3D polygons
  • Apply the concepts of 2D and 3D applications
  • Develop stereoscopic scenes
  • Review a straightforward introduction to 2D, 3D, and stereoscopic graphics applications
  • Use simple analytical equations from vector algebra
Who This Book Is For

The primary audience is students and researchers in graphics programming with experience in analytical equations.
Chapter 1: Preliminaries. Software installation
1.1. installing pip3 and IDLE
1.2. Installing kivy
1.3. Installing buildozer

Chapter 2: Polygon rotation in two dimensions
2.1. Rotation equations
2.2. Mapping equations to the screen

Chapter 3: Two dimensional polygon programming
3.1. Polygon structure
3.2. Drawing the edges of the polygon
3.3. Filling the polygon with lines
3.4. Rotating the polygon
3.5. The kivy platform
3.6. main.py listing
3.7. File.kv lisitng
3.8. Using buildozer

Chapter 4: Three-dimensional projections and rotations
4.1. Projection of a three-dimensional point into a plane
4.2. Rotation of a point in a plane

Chapter 5: Programming three-dimensional polygons
5.1. Polygon structure
5.2. Basic functions
5.3. main.py listing
5.4. File.kv

Chapter 6:  Stereoscopic 3D Programming
6.1. Basics of a stereoscopic view
6.2. Programming and ORing the images
6.3. Projections
6.4. Polygon structure
6.5. DrawAxes function
6.6. Points of projection
6.7. main.py listing
6.8. File.kv

Chapter 7:  3D plots programming
7.1. Program basic operations
7.2. Function overview
7.3. Generating the axes, the mesh and the function
7.4. Plotting the function in the screen
7.5. Rotating the plot
7.6. main.py listing
7.7. File.kv listing

Chapter 8: Stereoscopic 3D plots
8.1. Creating the function, coordinates and mesh
8.2. Creating two images for stereoscopic effects
8.3. Drawing the plot
8.4. main.py listing
8.5. File.kv listing
8.6. Surfaces with saddle points

Chapter 9: 3D parametric plots
9.1. Parametric equations
9.2. Plotting
9.3. main.py
9.4. File.kv

Chapter 10: Stereoscopic 3D parametric plots
10.1. Generating the function
10.2. Creating PIL images for the stereoscopic effect
10.3. Plotting the function
10.4. main.py
10.5. File.kv

Chapter 11: Sympy
11.1. Analytical expressions and symbols
11.2. Declaring functions with analytical expressions
11.3. Solving equations
11.4. Solving simultaneous equations
11.5. Differentiation
11.6. Integration

Chapter 12: Plotting functions in spherical coordinates
12.1. Spherical coordinates
12.2. Spherical differential equation example
12.3. The associated Legendre polynomials
12.4. Plotting 3D spherical coordinates
12.5. main.py listing
12.6. File.kv listing
12.7. Incorporating sympy into the Android project

Chapter 13. Stereoscopic plots of spherical functions
13.1. Creating the stereoscopic scenes
13.2. main.py listing
13.3. File.kv listing

Chapter 14. Stereoscopic simple numerical method for the gravitational N-body problem
14.1. The gravitational N-body problem
14.2. Motion equations
14.3. Numerical approach of the dynamic equations
14.4. Capturing numerical data
14.5. Five planets example
14.6. main.py listing
14.7. File.kv

Chapter 15. Stereoscopic cylindrical coordinates plotting. Aberrations of optical lenses
15.1. Ideal lens focusing. The Fresnel diffraction integral
15.2. Departure from the ideal lens
15.3. The wave aberration function in cylindrical coordinates
15.4. Stereoscopic plot of the wave aberration terms in cylindrical coordinates
15.5. main.py listing
15.6. File.kv listing

Chapter 16. Stereoscopic plotting of three-dimensional conics
16.1. Analytical approach
16.2. Stereoscopic ellipsoid plotting
16.3. main.py (Ellipsoid)
16.4. File.kv
16.5. HyperboloidChapter 1: Preliminaries. Software installation
1.1. installing pip3 and IDLE
1.2. Installing kivy
1.3. Installing buildozer

Chapter 2: Polygon rotation in two dimensions
2.1. Rotation equations
2.2. Mapping equations to the screen

Chapter 3: Two dimensional polygon programming
3.1. Polygon structure
3.2. Drawing the edges of the polygon
3.3. Filling the polygon with lines
3.4. Rotating the polygon
3.5. The kivy platform
3.6. main.py listing
3.7. File.kv lisitng
3.8. Using buildozer

Chapter 4: Three-dimensional projections and rotations
4.1. Projection of a three-dimensional point into a plane
4.2. Rotation of a point in a plane

Chapter 5: Programming three-dimensional polygons
5.1. Polygon structure
5.2. Basic functions
5.3. main.py listing
5.4. File.kv

Chapter 6:  Stereoscopic 3D Programming
6.1. Basics of a stereoscopic view
6.2. Programming and ORing the images
6.3. Projections
6.4. Polygon structure
6.5. DrawAxes function
6.6. Points of projection
6.7. main.py listing
6.8. File.kv

Chapter 7:  3D plots programming
7.1. Program basic operations
7.2. Function overview
7.3. Generating the axes, the mesh and the function
7.4. Plotting the function in the screen
7.5. Rotating the plot
7.6. main.py listing
7.7. File.kv listing

Chapter 8: Stereoscopic 3D plots
8.1. Creating the function, coordinates and mesh
8.2. Creating two images for stereoscopic effects
8.3. Drawing the plot
8.4. main.py listing
8.5. File.kv listing
8.6. Surfaces with saddle points

Chapter 9: 3D parametric plots
9.1. Parametric equations
9.2. Plotting
9.3. main.py
9.4. File.kv

Chapter 10: Stereoscopic 3D parametric plots
10.1. Generating the function
10.2. Creating PIL images for the stereoscopic effect
10.3. Plotting the function
10.4. main.py
10.5. File.kv

Chapter 11: Sympy
11.1. Analytical expressions and symbols
11.2. Declaring functions with analytical expressions
11.3. Solving equations
11.4. Solving simultaneous equations
11.5. Differentiation
11.6. Integration

Chapter 12: Plotting functions in spherical coordinates
12.1. Spherical coordinates
12.2. Spherical differential equation example
12.3. The associated Legendre polynomials
12.4. Plotting 3D spherical coordinates
12.5. main.py listing
12.6. File.kv listing
12.7. Incorporating sympy into the Android project

Chapter 13. Stereoscopic plots of spherical functions
13.1. Creating the stereoscopic scenes
13.2. main.py listing
13.3. File.kv listing

Chapter 14. Stereoscopic simple numerical method for the gravitational N-body problem
14.1. The gravitational N-body problem
14.2. Motion equations
14.3. Numerical approach of the dynamic equations
14.4. Capturing numerical data
14.5. Five planets example
14.6. main.py listing
14.7. File.kv

Chapter 15. Stereoscopic cylindrical coordinates plotting. Aberrations of optical lenses
15.1. Ideal lens focusing. The Fresnel diffraction integral
15.2. Departure from the ideal lens
15.3. The wave aberration function in cylindrical coordinates
15.4. Stereoscopic plot of the wave aberration terms in cylindrical coordinates
15.5. main.py listing
15.6. File.kv listing

Chapter 16. Stereoscopic plotting of three-dimensional conics
16.1. Analytical approach
16.2. Stereoscopic ellipsoid plotting
16.3. main.py (Ellipsoid)
16.4. File.kv
16.5. Hyperboloid
16.6. main.py (Hyperboloid)

Chapter 17. Two-dimensional Fourier transform
17.1. One-dimensional Fourier transform
17.2. Rectangular and sinc functions
17.3. Code for calculating the discrete one-dimensional Fourier transform
17.4. Two-dimensional Fourier transform
17.5. Discrete two-dimensional Fourier transform
17.6. main.py lisitng
17.7. File.kv listing
17.8. The Fourier transform of the circular function
17.9. Analytical formulation for the Fourier transform of the circular function

Chapter 18. Stereoscopic two-dimensional Fourier transform
18.1. Piloting the functions
18.2. main.py listing
18.3. File.kv listing

16.6. main.py (Hyperboloid)

Chapter 17. Two-dimensional Fourier transform
17.1. One-dimensional Fourier transform
17.2. Rectangular and sinc functions
17.3. Code for calculating the discrete one-dimensional Fourier transform
17.4. Two-dimensional Fourier transform
17.5. Discrete two-dimensional Fourier transform
17.6. main.py lisitng
17.7. File.kv listing
17.8. The Fourier transform of the circular function
17.9. Analytical formulation for the Fourier transform of the circular function

Chapter 18. Stereoscopic two-dimensional Fourier transform
18.1. Piloting the functions
18.2. main.py listing
18.3. File.kv listing

Moisés Cywiak is a researcher in physical optical sciences with over 20 years of teaching experience in physics, mathematics, electronic engineering, and programming in C, C++, and python, in Centro de Investigaciones en Óptica A.C.

David Cywiak received his Ph.D. degree in physics in 2014 from Universidad de Guanajuato. From 2012 to 2013 he collaborated as a guest researcher at the Dalton Cardiovascular Research Center, University of Missouri-Columbia, in the development of an optical-photoacoustic system intended for the detection of photoacoustic signals generated by cancerous cells. Since 2014 he has been working as a metrologist in the Thermometry Department at Centro Nacional de Metrologia, México. His research includes photoacoustics, optical engineering and radiation thermometry. He has over 7 years of experience teaching physics, mathematics and programming in C for undergraduate students. He also has over 5 years of experience teaching Temperature measurement techniques and calibration of instruments in the thermometry area for industry professionals.  

Understand multi-platform graphics programming

Learn to design graphic applications with a mathematical approach

Get up to date on the latest advances in stereoscopic programming