Introduction

The chip at the heart of the original Raspberry Pi (a Broadcom BCM2835 processor) was originally designed to be a Graphical Processing Unit (GPU) for mobile and embedded applications. The ARM core that drives most of Raspberry Pi's functionality was added because some extra space was available on the chip; this enabled this powerful GPU to be used as a System-on-Chip (SoC) solution.

An SoC is an integrated service microchip with all the necessary electronic circuits and parts of a computer or electronic system, it is used in smartphones or wearable computers, on a single integrated circuit (IC).

As you can imagine, if that original ARM core (ARM1176JZF-S, which is the ARMv6 architecture) consisted of only a small part of the chip on Raspberry Pi, you would be right in thinking that the GPU must perform rather well.

The processor at the heart of Raspberry Pi 3 has been upgraded (to a Broadcom BCM2837 processor); it now contains four ARM cores (Cortex A53 ARMv8A), each of which are more powerful than the original ARMv6. Coupled with the same GPU from the previous generation, Raspberry Pi 3 is far better equipped to perform the calculations required to build 3D environments. However, although Raspberry Pi 3 will load the examples faster, once the 3D models are generated, both versions of the chip perform just as well.

The VideoCore IV GPU consists of 48 purpose-built processors, with some providing support for 1080p high-definition encoding and decoding of video, while others support OpenGL ES 2.0, which provides fast calculations for 3D graphics. It has been said that its graphics processing power is equivalent to that of an Apple iPhone 4S and the original Microsoft Xbox. This is even more apparent if you run Quake 3 or OpenArena on Raspberry Pi (go to http://www.raspberrypi.org/openarena-for-raspberry-pi for details).

In this chapter, I hope to show you that while you can achieve a lot by performing operations using the ARM side of Raspberry Pi, if you venture to the side where the GPU is hidden, you may see that there is even more to this little computer than what first appears.

The pi3d library created by the pi3d team (Patrick Gaunt, Tom Swirly, Tim Skillman, and others) provides a way to put the GPU to work by creating 3D graphics.

The pi3d Wiki and documentation pages can be found at the following link: http://pi3d.github.io/html/index.html.

The support/development group can be found at the following link: https://groups.google.com/forum/#!forum/pi3d.

The library contains many features, so it will not be possible to cover everything that is available in the following examples. It is recommended that you also take some time to try out the pi3d demos. To discover more options for the creation and handling of the 3D graphics, you can have a look through some of the Python modules which make up the library itself (described in the documentation or the code on GitHub at https://github.com/pi3d/pi3d.github.com). It is hoped that this chapter will introduce you to enough concepts to illustrate some of the raw potential available to you.

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

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