C语言图形编程(五、二维图形变换-01)(国外英文资料)
C语言图形编程(五、二维图形变换-01)(国外英文资料)
The first user coordinates to the screen coordinate transformation
Window to viewport transformation
The transformation of the real value to the integer value
The y is in the direction of the value
Change the length of the scale
The second two dimensional geometry transformation
One, the basic transformation
1, the scaling transformation
Symmetrical transformation
The wrong cut transformation
Rotation transformation
translation
Second, complex transformation
Composite translation
Composite ratio
Compound rotation
The ratio of the relative point (xo, yo)
The rotation transformation of the relative point (xo, yo)
Since this part into quite tedious part of graphics programming, to really to understand graphics programming, this part of content is a must to grasp.
In the process of computer drawing, the transformation of the drawing is often required, mainly including the two-dimensional graphics transformation and the three-dimensional graphical transformation. This part discuss the two-dimensional graphics transform, its content has the user coordinate to screen coordinate transformation, the proportion of graphics transform, symmetry transform, shear transformation, translation, rotation transformation and complex transformation, etc. And then we have the two-dimensional clipping, which is the line segment cutting and the polygon cropping.
The first user coordinates to the screen coordinate transformation
Let's say you have a graph on the paper, and you want to draw it on the screen. So the first problem is that the graph on paper is a rectangular coordinate system in a real domain or a polar coordinate system, which is called the user coordinate system. And the coordinate system on the screen is the rectangular coordinate system in the integer domain, which is called the device coordinate system. So the user coordinate system graphics after transformation is needed to draw on the screen, obviously this transformation include: 1) the sco