Coordinate Representations in Computer Graphics

With few exceptions, general graphics packages are designed to be used with Cartesian coordinate specifications. If coordinate values for a picture are specified in some other reference frame (spherical, hyperbolic, etc.), they must be converted to Cartesian coordinates before they can be input to the graphics package. Special-purpose packages may allow use of other coordinate frames that are appropriate to the application. In general; several different Cartesian reference frames are used to construct and display a scene. We can construct the shape of individual objects, such as trees or furniture, in a scene within separate coordinate reference frames called modeling coordinates (MC), or sometimes local coordinates or master coordinates. Once individual object shapes have been specified, we can place the objects into appropriate positions within the scene using a reference frame called world coordinates (WC). Finally, the world-coordinate description of the scene is transferred to one or more output-device reference frames for display. These display coordinate systems are referred to as device coordinates (DC) or, screen coordinates in the case of a video monitor. Modeling and world-coordinate definitions allow us to set any convenient floating-point or integer dimensions without being hampered by the constraints of a particular output device. For some scenes, we might want to specify object dimensions in fractions of a foot, while for other applications we might want to use millimeters, kilometers, or light-years.

Generally, a graphics system first converts world-coordinate positions to normalized device coordinates (NDC), in the range from 0 to 1, before final conversion to specific device coordinates. This makes the system independent of the various devices that might be used at a particular workstation. Figure 2-65 illustrates the sequence of co-ordinate transformations from modeling coordinates to device co-ordinates for a two-dimensional application. An initial modeling-coordinate position (Xmc, Ymc) in this illustration is transferred to a device coordinate position (Xdc, Ydc) with the sequence:
Fig: Viewing Pipeline 

The modeling and world-coordinate positions in this transformation can be any floating-point values; normalized coordinates satisfy the inequalities: 0 ≤ Xndc ≤ 1, 0 ≤ Yndc ≤ 1; and the device coordinates Xdc and Ydc are integers within the range (0, 0) to (Xmax, Ymax) for a particular output device. To accommodate differences in scales and aspect ratios, normalized coordinates are mapped into a square area of the output device so that proper proportions are maintained.

No comments:

Post a Comment