Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

13. Graphics and OpenGL > Using Coordinates and Transforms in Processing

Using Coordinates and Transforms in Processing

The previous code snippets have touched on how to move objects and views around in 3-D in a Processing application, but these all merit a closer examination.

There are two coordinate systems in Processing to consider: the coordinates of the world and the coordinates of the screen. The difference is the location of the 0,0,0 point. Although a model may have its 0,0,0 point in one location, because of rotations and transformations applied to the model, it will appear in an entirely different location on the screen, as in Figure 13-8.

The model coordinate system and the screen coordinate system may not be the same values

Figure 13-8. The model coordinate system and the screen coordinate system may not be the same values

Imagine that you have a cube you’ve drawn as shown in the code snippet below:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial