نحن ندرس مادة جرافيكس ولكننا ندرس معلومات أخرى غير ما أقرأ هنا ..
عجيب
نحن بدانا ندرس كلاما نظريا عن الجرافيكس ومميزات الجرافيكس ووو
ثم درسنا خوارزميات رسم المستقيم والدائرة ووو وتعبئة الأشكال المغلقة وووو
ثم درسنا فصلا لا أدري ماهو يسمى projection وشيء آخر اسمه view و يا ترى هل أجد منكم من يترجم لي أو يفهمني الكلام هذا ؟؟
ربما تجد فراغات قليلة وكلام ناقص .. المهم أنك سوف تساعد أكثر من 150 طالبة في هذا الفصل الدراسي واعتبره وقف لأنه جميع الطالبات في السنوات القادمة سيستفيدون منه
Projection
In general, projections transform points in coordinate system of dimension n into points in a coordinate system of dimension less than n. In fact, computer graphics has long been used for studying n-dimensional objects by projecting them into 2D for viewing [NOLL67]. Here, we shall limit ourselves to the projection from 3D to 2D. The projection of a 3D object is defined by straight projection rays (called projectors) emanating from a center of projection, passing through each point of the object and intersecting a projection plane to from the projection. Figure 6.2 shows two different projections of the same line fortunately, the projection of a line is itself a line, so only line endpoints need actually to be projected.
The class of projections we deal with here is known as planer geometric projections because the projections is onto a plane rather than some curved surface and uses straight rather than curved projection. Many cartographic projections are either nonplanar or nongeometric similarly the omnimax_film format requires a nongeometric projection [MAX28]
Planar geometric projections hereafter referred to simply as projections can be divided into two basic classes: perspective and parallel. The distinction is in the relation of the center of projection to the projection plane. If the distance from the one to the other … finite, then the projection is perspective: if the distance is infinite, the projection is parallel.
Figure 6.2 illustrates these two causes. The parallel projections is so named because with the center of projection infinitely distant the projectors are parallel when defining a perspective projection we explicitly specify its center of projection being a point has homogeneous coordinates of the form (x, y, z, 1). Since the direction of projection is a vector (i.e., a difference between points). It can be computed by subtracting two points d= (x, y, z, 1) – (x’, y’, z’, 1) = (a, b, c, 0). Thus, directions and points at infinity correspond in a natural way. A perspective projection whose center is a point at infinity becomes a parallel projection.
The visual effect of a perspective projection is similar to that of photographic systems and of an object varies inversely with the distance of that object from the center of projection. Thus, although the perspective projection of objects tend to look realistic, it is not particularly useful for recording the exact shape and measurements of the objects; distances cannot be taken from the projection, angles are preserved only on those faces of the object parallel to the projection plane, and parallel lines do not in general project as parallel lines.
The parallel projection is a less realistic view because perspective foreshortening is lacking, although there can be different constant foreshortenings along each axis. The projection can be used for exact measurements and parallel lines do remain parallel. As with the perspective projection, angles are preserved only on faces of the object parallel to the projection plane.
The different types of perspective and parallel projections are discussed and illustrate at length in the comprehensive paper by Carlbom and Paciorek [CARL78]. In the following two subsections, we summarize the basic definitions and characteristics of the more commonly used projections; we then move on in Section 6.2 to understand how the projections are actually specified to PHIGS.
6.1.1 Perspective Projections
The perspective projections of any set of parallel lines that are parallel to the projection plane converge to a vanishing point. In 3D, the parallel lines meet only at infinity, so the vanishing point can be thought of as the projection of a point at infinity. There is of course an infinity of vanishing points, one for each of the infinity of directions in which a line can be oriented.
If the set of lines is parallel to one of the three principal axes, the vanishing point is called an axis vanishing point. There are at most three such points, corresponding to the number of principal axes cut by the projection plane. For example, if the projection plane ___ only the z axis (and is therefore normal to it), only the z axis has a principal vanishing point, because lines parallel to either the y or x axes are also parallel to the projection plane and have no vanishing point.
Perspective projections are categorized by their number of principal vanishing points and therefore by the number of axes the projection plane cuts. Figure 6.3 shows two different one-point perspective projections of a cube. It is clear that they are one-point projections because lines parallel to the x and y axes do not converge; only lines parallel to the z axis do so. Figure 6.4 shows the construction of a one-point perspective with some of the projectors and with the projection plane cutting only the z axis.
Figure 6.5 shows the construction of a two-point perspective. Notice that the lines parallel to the y axis do not converge in the projection. Two-point perspective is commonly used in architectural, engineering, industrial design, and in advertising drawings. Three-point perspectives are used less frequently, since they add little realism beyond that afforded to the two-point perspective.
6.1.2 Parallel Projections
Parallel projections are categorized into types, depending on the relation between a direction of projection and the normal to the projection plane. In orthographic parallel projections, these directions are the same (or the reverse of each other), so the direction of projection is normal to the projection plane. For the oblique parallel projection, they are not.
The most common types of orthographic projections are the front-elevation, top-elevation (also called plan-elevation), and side-elevation projections. In all these, the projection plane is perpendicular to a principal axis, which is therefore the direction of projection. Figure 6.6 shows the construction of these three projections; they are often used in engineering drawings to depict machine parts, assembles, and buildings, because distances and angles can be measured from them. Since each depicts only one face of an object, however, the 3D nature of the projected object can be difficult to deduce, even if several projections of the same object are studied simultaneously.
Axonometric orthographic projections are projection planes that are not normal to a principal axis and therefore show several faces of an object at once. They resemble the perspective projection in this way, but differ in that the foreshortening is uniform rather than being related to the distance from the center of projection. Parallelism of lines is preserved but angles are not, while distances can be measured along each principal axis (in general, with different scale factors).
The isometric projection is a commonly used axomometric projection. The projection-plane normal (and therefore the direction of projection) makes equal angles with each principal axis. If the projection-plane normal is (dx, dy, dz), then we require that |dx| = |dy| = |dz| or ± dy = ±dz. There are just directions (one in each octant) that satisfy this condition. Figure 6.7 shows the construction of an isometric projection along one such direction, (1, -1, -1).
The isometric projection has the property that all three principal axes are equally foreshortened, allowing measurements along the axes to me made to the same scale (hence the name: iso for equal, metric for measure). In addition, the principal axes project so as to make equal angles one with another, as sown in Fig. 6.8.
Oblique projections, the second class of parallel projections, differ from orthographic projections in that the projection-plane normal and the direction of projection differ.
Construction of oblique projection. (Adapted from [CARL78], association for computing machinery, inc.; used by permission.)
Oblique projection combine properties of the front, top, and side orthographic projections with those of the axonometric projection: the projection plane is normal to a principal axis, so the projection of the face of the object parallel to this plane allows measurement of angles and distances. Other faces of the object project also, allowing distance along principal axes, but not angles, to be measured. Oblique projections are widely, although not exclusively, used in this text because of these properties and because they are easy to draw figure 6.9 shows the construction of an oblique projection. Notice that the projection-plane normal and the direction of projection are not the same.
Two frequently used oblique projections are the cavalier and the cabinet. For the cavalier projection, the direction of projection makes a 45 angle with the projection plane. As a result , the projection of a line perpendicular to the projection plane has the same length as the line itself ; that is , there is no foreshortening . figure 6.10 shows several cavalier projection of the unit cube onto the (x, y) plane ; the receding lines are the projections of the cube edges that are perpendicular to the (x, y) plane , and they form an angle to the horizontal. This angle is typically 30 or 45
Oblique projections combine properties of the front, top, and side orthographic projections with those of the axonometric projection: the projection plane is normal to a principal axis, so the projection of the face of the object parallel to his plane allows measurement of the of angles and distances. Other faces of the object project also, allowing distances along principal axes, but not angles, to be measured. Oblique projections are widely, although not exclusively, used in this text because of these properties and because they are easy to draw. Figure 6.9 shows the construction of an oblique projection. Notice that the projection-plane normal and the direction of projection not the same.
Two frequently used oblique projections are the cavalier and the cabinet. For the cavalier projection, the direction of projection makes a 45° degree angle with the projection plane. As a result, the projection of a line perpendicular to the projection plane has the same length as the line itself; that is, there is no foreshortening. Figure 6.10 shows several cavalier projections of the unit cube onto the (x, y) plane; the receding lines are the projections of the cube edges that are perpendicular to the (x, y) plane, and they form an angle a to the horizontal. This angle is typically 30° or 45°.
Cabinet projections, such as those in Figure 6.11, have a direction of projection that makes an angle of arctan(2) = 63.4° with the projection plane, so lines perpendicular to the projection plane project at one-half their actual length. Cabinet projections are a bit more realistic that cavalier ones are, since the foreshortening by on-half is more in keeping with our other visual experiences.
Figure 6.12 helps to explain the angles made by projectors with the projection plane for the cabinet and cavalier projections. The (x, y) plane is the projection plane and the point P' is the projection of (0, 0, 1) onto the projection plane. The angle a and length l are the same as are used in Fig. 6.10 and 6.11, and we can control them by varying the direction of projection (l is the length at which the z-axis unit vector projects onto the (x, y) plane; a is (dx, dy, - 1), we see from Fig. 6.12 that dx = l cosa and dy= lsina. Given a desired l and a, the direction of projection is (l cosa, l sina, -1).
Figure 6.13 shows the logical relationships among the various types of projections. The common thread uniting them all is that they involve a projection plane and either a center of projections for the perspective, or a direction of projection for the parallel projection. We can unify the parallel and perspective cases further by thinking of the center of projection as defined by the direction to the center of projection from some reference because the projection matrix can be composed with transformation matrices, allowing two operations (transform, then project) to be represented as a single matrix. In the next section, we discuss arbitrary projection plane.
In this section, we derive 4 X 4 matrices for several projections, beginning with a projection plane at a distance d from the origin and a point P to be projected onto it. To calculate Pp = (Xp, Yp, Zp), the perspective projection of (x, y, z) onto the projection plane z = d, we use the similar triangles in Fig. 6.42 to write the ratios.
Multiplying each side by d yields
The distance d is just a scale factor applied to Xp and Yp. The division by z causes the perspective projection of more distant objects to be smaller than that of closer objects. All values of z are allowable except z = 0. Points can be behind the center of projection on the negative z axis or between the center of projection and the projection plane.
The transformation of Eq. (6.2) can be expressed as a 4 X 4 matrix:
Multiplying the point P = [x y z]T by the matrix Mper yields the general hemogenous point [X Y Z W]T
Now, dividing by W (which is z/d)and dropping the fourth coordinate to come back to 3D, as have
These equations are the correct results of Eq. (6.1), plus the transformed z coordinate of d which is the position of the projection plane along the z axis.
An alternative formulation for the perspective projection places the projection plane at z = 0 and the center of projection at z = -d, as in Fig. 6.43. Similarity of the triangles now give
Multiplying by d, we get
This formulation allows d, the distance to the center of projection, to tend to infinity.
The orthographic projection onto a projection plane at z = 0 is straightforward. The direction of projection is the same as the projection-[lane normal – the z axis, in this case. Thus, point P projects as
This projection is expressed by the matrix
Notice that as d in Eq. (6.9) tends to infinity, Eq. (6.9) becomes Eg. (6.11).
Mper applies only in the special case in which the center of projection is at the origin; Mort applies only when the direction of projection is parallel to the z axis. A more robust formulation, based on a concept developed in [WEIN87], not only removes these restrictions but also integrates parallel and perspective projections into a single formulation. In Fig. 6.44, the projection of the general point P = (x, y, z) onto the projection plane is P = (Xp, Yp, Zp). The projection plane is perpendicular to the Zp from the origin, and the center of projection (COP) is a distance (0, 0, Zp). The direction from (0, 0, Zp) to COP is given by the normalized direction vector (dx,dy,dz). Pp is on the line between COP and P, which can be specified parametrically as
COP + t(P – COP), 0 ≤ t ≤ 1.
Rewriting Eq. (6.12) as separate equations for the arbitrary point P' = (x'. y', z') on the line, with COP = (), 0, zp) = Q(dz, dy, dz) yields.
x' = Q dz + (x – Q dz)t,
y' = Q dy + (y – Q dy)t,
z' = (zp + Q dz) + (z – (zp + Q dz))t.
We find the projection Pp of the point P, at the intersection of the line between COP and P with the projection plane, by substituting z' = zp into Eq. (6.15) and solving for t:
t =
Substituting this value of t intoEq. (6.13) and Eq. (6.14) to find x' = xp and y' = yp yields
Multiplying the identity zp = zp on the right-hand side by a fraction whose numerator and denominator are both
Maintains the identity and gives zp the same demonimator as xp and yp:
Now Eqs. (6.17), 6.18), and (6.20) can be rewritten as 4 x 4 matrix Mgeneral arranged so that the last row of Mgeneral multiplied by [x y z 1] produces their common denominator, which is the homogeneous coordinate W.
Mgeneral specializes to all three of the previously derived projection matrixes Mper, M'per, and Mort, given the following values
When Q ≠ ∞, Mgeneral defines a one-point perspective projection. The vanishing point of a perspective projection is calculated by multiplying the point at infinity on the z axis, represented in homogenous coordinates as [0 0 1 0]T, by Mgeneral. Taking this product and dividing by W gives
X = Q dx, y= Q dy, z = zp.
Given a desired vanishing point (x, y) and a known distance Q to the center of projection of these equations uniquely define [dz dy dz], because √
Similarly, it is easy to show that, for cavalier and cabinet projections onto the (x, y, z) plane, with a the angle shown in Figs. 6.10 and 6.11
In this section, we have seen how to formulate Mper, M'per, and Mort, all of which are special cases of the more general Mgeneral. In all these cases, however, the projection plane is perpendicular to the z axis. In the next section, we remove this restrictions and consider the clipping implied by finite view volumes.
الصفحة 1 من 1
غريبة .. ماذا تعني كلمة جرافيكس .. سؤال
الصفحة 1 من 1


تسجيل الدخول
التسجيل
المساعدة
الموضوع مقفل
ارجع للأعلى
متعدد الإقتباسات