Positioning the camera

Camera position Every scene rendered with ILPanel visualizes a numeric space in two or three dimensions. Each direction - of course - is only visible, if the scene is rotated accordingly. For 2D graphs, the X- and Y- directions of that space are always visible, the Z-direction is hidden. The rotation is realized by positioning a virtual camera (ILCamera) around the scene. The camera is always aiming to the middle of the scene. Its position is determined by polar coordinate values: Rotation, Pitch and Distance.

Rotating the scene is indirectly done by rotating the camera. Moving the camera around the scene counter clockwise (i.e. in mathematical positive direction), will therefore make the visible scene to appear as rotating in clockwise direction.

A Pitch value of 0 corresponds to a camera looking straight from the top onto the scene. Only the X- and Y-axis are visible in this case. Increasing the Pitch leads to the visible impression of a scene beeing watched more and more from the side. The Pitch is limited to values between 0 (watching from top) to Pi, where the scene is seen from below.

To understand the influence of the Distance property is a little more complicated. Here we must take the method of projection for the scene into account.

Projection methods

Per default ILPanel renders the scene with orthographic (perpendicular) projection. That is, the scene is perpendicular or parallel projected onto the screen. Therefore, for the result it does not matter, if the scene is far away or very close by the camera.

By setting the ILPanel.Projection property to Projection.Perspective, the scene is rendered in the way, known from real situations: objects far away appear smaller than objects close by the camera. However, because ILPanel will always render the scene to optimally fill the available rendering surface, moving the camera closer to the scene will result in a more distored projection than a camera more far away. See the following images for reference.

Perspektive projection: close
Perspective projection, camera at '1'.
Perspektive projection: dist
Perspective projection, camera at '10'.


Valid CSS! Valid XHTML 1.0 Transitional