It’s not possible to cater for all levels of knowledge and experience in one book. Inevitably you will find sections where I cover things that you already know and you can skip ahead quickly, but there will also be parts that seem difficult where you will have to take it slowly and check things out on-line (I try to include links where they might be useful but you can always resort to google!). I assume that:
A book on how to program, or use a module within a language, inevitably needs lots of code to look at and run (unless it sets out to be a very boring book). And code needs lots of comments and explanations because that’s almost the essence of good coding. So it did occur to me that the whole book could be constructed entirely from the documentation in the example programs that accompanied it. However, although this works for generating documentation (as used for http://pi3d.github.io/html/index.html), it produces too many constraints and a rather unwieldy book structure. In the end I opted for this:
The programs are referenced from the narrative and include comprehensive docstrings and comments. The code and the docstrings are NOT duplicated in the narrative so it is essential that the book is read in conjunction with the programs, and that the programs are read as well as run.
If you don’t have pi3d set up already you need to read the relevant section here http://pi3d.github.io/html/ReadMe.html#setup-on-the-raspberry-pi and the paragraphs below it, that apply to your platform.
At points in the book I will suggest that you look in various pi3d files and if you installed on Raspberry Pi or Linux these will be in /usr/local/lib/python2.7/dist-packages/pi3d/ (or similar), on Windows try C:\Python27\Lib\site-packages\pi3d\. Obviously python3 would have an appropriately different path.
Also the demos from github.com/pi3d/pi3d_demos (using git clone or download the zip and extract it), and obviously you need a copy of the example programs for this book github.com/paddywwoof/pi3d_book
[1] | numpy python module for fast array processing http://www.numpy.org/ |
[2] | ctypes python module for interacting with imported C libraries https://docs.python.org/2/library/ctypes.html |
[3] | http://en.wikipedia.org/wiki/OpenGL_Shading_Language |
[4] | https://www.mathsisfun.com/sine-cosine-tangent.html |
[5] | https://www.mathsisfun.com/pythagoras.html |
[6] | http://www.intmath.com/vectors/vectors-intro.php |