CH 3
CH 3
Chapter 3
1
OpenGL Coordinate system
In a 2-D coordinate system, the X axis generally points from
left to right, and the Y axis generally points from bottom to
top. (Although some windowing systems will have their Y
coordinates going from top to bottom). When we add the
third coordinate Z, we have a choice as to whether the Z-axis
points into the screen or out of the screen
3
Contd…
World Coordinate System As discussed above every object
has its own MCS relative to which its geometrical data is
stored. In case of multiple objects in the same working space
then there is need of a World Coordinate System which
relates each MCS to each other with respect to the orientation
of the WCS. It can be seen by the picture shown above
Hierarchical Coordinate Systems Sometimes objects in a
scene are arranged in a hierarchy, so that the "position" of one
object in the hierarchy is relative to its parent in the hierarchy
scheme, rather than to the world coordinate system. For
example, a hand may be positioned relative to an arm, and
the arm relative to the torso. When the arm moves, the hand
moves with it, and when the torso moves, all three objects
move together.
4
Contd…
Viewpoint Coordinate System Also known as the "camera" coordinates system.
This coordinate system is based upon the viewpoint of the observer, and changes
as they change their view.
Model Window (Screen) Coordinate System This coordinate system refers to
the subset of the overall model world that is to be displayed on the screen.
Depending on the viewing parameters selected, the model window may be
rectalinear or a distorted viewing frustrum of some kind. This 2D coordinate
system refers to the physical coordinates of the pixels on the computer screen,
based on current screen resolution
Viewport Coordinate System This coordinate system refers to a subset of the
screen space where the model window is to be displayed. Typically the viewport
will occupy the entire screen window, or even the entire screen, but it is also
possible to set up multiple smaller viewports within a single screen window. As
discussed that the objects are modeled in WCS, before these object descriptions
can be projected to the view plane, they must be transferred to viewing
coordinate system. The view plane or the projection plane is set up
perpendicular to the viewing zv axis. The World coordinate positions in the scene
are transformed to viewing coordinates, and then viewing coordinates are
projected onto the view plan
5
Contd…
6
Viewing Using a Synthetic Camera
synthetic camera is a type of rendering technique that seeks to replicate the
camera or the human eye, rather than the perfectly sharp achromatic pictures usually
position of camera
9
Contd…
Output Primitive Attributes
Point Size
Color
Line Thickness (1pt, 2pt …)
Type (Dashed, Dotted, Solid)
Color
Text Font (Arial, Courier, Times Roman…)
Size (12pt, 16pt ..)
Spacing
Orientation (Slant angle)
Style (Bold, Underlined, Double lined)
Color
Filled Region Fill Pattern
Fill Type (Solid Fill, Gradient Fill)
Fill Color
Images Color Depth (Number of bits/pixel)
10
Question
s?
Thank You!
11