Graphics Reference
In-Depth Information
Window manager. Because our application runs in a shared windowing
environment, it is always possible that the environment may change the size
of the UI drawing area and inform our application about the changes. In
this case, if the DC aspect ratio is changed, then in order to maintain proper
proportions, we must change the WC window dimension accordingly. For
example, initially our application may have a WC window size of 10
×
10
×
and a DC displaying area of 200
200. If for some reason, the window
manager decides to change the DC drawing area to 200
×
100, we must
update the WC window to match the 0
.
5 DC aspect ratio. In this case, we
can:
- increase the WC window size to 10
×
20 and show more of the WC
space; or
- decrease the WC window size to 5
×
10 and show less of the WC
space.
The first option guarantees that we will show at least the original WC win-
dow, whereas the second option guarantees that we will show at most the
original WC window. The choice between the above two options is a policy
decision: neither choice is more correct. We should program our applica-
tion to support the behavior specified by the user.
10.4.5
Summary
The world coordinate (WC) system is introduced to dissociate our model design
space from the dimensions of the UI drawing area.
As we have seen, this is
advantageous for the following reasons.
• With the WC, we can define any coordinate system that is convenient for
designing the geometric models and not be concerned with the dimensions
of the eventual output drawing area.
• With the WC window , we can control the parameters (center, width, and
height) to select the exact regions of the WC space to be displayed in the
UI drawing area.
To properly support the WC system, the graphics API introduces the normalized
device coordinate (NDC) system, a coordinate system bounded by
1. Our job as
the graphics API programmer is to compute the M w 2 n (Equation (10.10)) operator
for each of the WC window regions we wish to display. The graphics API will
±
Search WWH ::




Custom Search