O'Reilly logo

openFrameworks Essentials by Denis Perevalov, Igor Tatarnikov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a camera

One of the advantages of 3D graphics over 2D graphics is the possibility of walking through the virtual scene and rotating objects in a way we do in real life. So the user feels as though he or she were inside that scene, observing real objects. The navigating in space is achieved using a camera. It is a special object that controls the way of projecting 3D points to 2D points on the screen.

Tip

There are two types of projections from 3D to 2D:

  • Perspective projection: Far-off objects look smaller than nearby objects. This is the type of projection used in openFrameworks by default.
  • Orthogonal projection: The visible size of an object does not depend on the distance to the viewer.

In openFrameworks, a camera can be represented by the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required