Download presentation
Presentation is loading. Please wait.
Published byEugene McCoy Modified over 9 years ago
1
168 471 Computer Graphics, KKU. Lecture 41 The Computer Programming Laws Any given program, when running, is obsolete. Any given program costs more and takes longer. If a program is useful, it will have to be changed. If a program is useless, it will have to be documented. Any given program will expand to fill all available memory. The value of a program is proportional to the weight of its output. Program complexity grows until it exceeds the capability of the programmer who must maintain it.
2
168 471 Computer Graphics, KKU. Lecture 42 Points One of the fundamental objects in 3D space that has position. The basis for all operation in computer graphics. Distinguished from each other with its position. Drawn as dots. Denoted by capitalized bold letters such as P and Q. If the Cartesian coordinate system is chosen, we represent points componentwise by utilizing parenthesis e.g ( x,y,z ).
3
168 471 Computer Graphics, KKU. Lecture 43 Trigonometry
4
168 471 Computer Graphics, KKU. Lecture 44 Polar Coordinates
5
168 471 Computer Graphics, KKU. Lecture 45 Parametric Functions
6
168 471 Computer Graphics, KKU. Lecture 46 Parametric Lines
7
168 471 Computer Graphics, KKU. Lecture 47 Parametric Circles
8
168 471 Computer Graphics, KKU. Lecture 48 Plotting Parametric Functions
9
168 471 Computer Graphics, KKU. Lecture 49 The fundamental 3D space objects like points. Has both magnitude and direction. But positionless. Drawn as lines segments with arrow. Denoted by lower case letters with an arrow above such as we represent vectors componentwise by utilizing brackets e.g. For each pair of point P and Q, there exists a unique vector such that Vectors
10
168 471 Computer Graphics, KKU. Lecture 410 Vectors
11
168 471 Computer Graphics, KKU. Lecture 411 Properties of Vectors
12
168 471 Computer Graphics, KKU. Lecture 412 Properties of Vectors (Cont.)
13
168 471 Computer Graphics, KKU. Lecture 413 “Multiplying” Vectors
14
168 471 Computer Graphics, KKU. Lecture 414 Vector Projection
15
168 471 Computer Graphics, KKU. Lecture 415 Planes
16
168 471 Computer Graphics, KKU. Lecture 416 Planes (Cont.)
17
168 471 Computer Graphics, KKU. Lecture 417 Matrices
18
168 471 Computer Graphics, KKU. Lecture 418 Matrix Multiplication
19
168 471 Computer Graphics, KKU. Lecture 419 Matrices (Cont.)
20
168 471 Computer Graphics, KKU. Lecture 420 Matrix Inversion
21
168 471 Computer Graphics, KKU. Lecture 421 Cartesian coordinate system Frame-based coordinate system Device space Screen Space Image Space Object Space World Space Coordinate Systems
22
168 471 Computer Graphics, KKU. Lecture 422 Cartesian coordinate system Right-hand system z xy x z y
23
168 471 Computer Graphics, KKU. Lecture 423 Cartesian coordinate system(Cont.) In the computer graphics community In computer graphics Right-hand system z x y x z y
24
168 471 Computer Graphics, KKU. Lecture 424 Frame-based coordinate system Consists of an origin and linearly independent vectors
25
168 471 Computer Graphics, KKU. Lecture 425 The actual coordinate system by which points are plotted on the graphics device. Measured in pixels On SGI machines –(0,0) is the lower left corner of a window. –X value increases to the right. –Y value increases upward. On Window platform –(0,0) is the upper left corner of a window. –X value increases to the right. –Y value increase downward. Device Space x x y y
26
168 471 Computer Graphics, KKU. Lecture 426 Screen Space Defined to be the square on the xy plane. Mapped to device space by most drivers for specific graphics devices
27
168 471 Computer Graphics, KKU. Lecture 427 Image Space Used in 3-D system to allow for depth calculations. Defined by Points in this space are mapped onto screen space by projecting them onto the plane. For example, any point in image space will be protected to the center of the display screen.
28
168 471 Computer Graphics, KKU. Lecture 428 World Space The coordinate system of the scene Must be projected into image space for viewing.
29
168 471 Computer Graphics, KKU. Lecture 429 Object Space Localized system of an object being created. After objects are created, about the world space they can be –transformed –duplicated –moved –.etc
30
168 471 Computer Graphics, KKU. Lecture 430 Affine Space Made up of points and vectors In affine space,
31
168 471 Computer Graphics, KKU. Lecture 431 Affine Space (Cont.) Vectors can be added, but points cannot. Vectors can be scaled, but point cannot. That is
32
168 471 Computer Graphics, KKU. Lecture 432 What is Affine Combination? If are points andare scalars such that then is defined to be the point
33
168 471 Computer Graphics, KKU. Lecture 433 Affine Combination of 2 Points Let P 1 and P 2 be points in an affine space, Consider the expression This P point represents a point on the line that passes through P 1 and P 2 Note that if then P is somewhere on the line segment joining P 1 and P 2.
34
168 471 Computer Graphics, KKU. Lecture 434 Affine Combination of 3 Points Consider three points P 1 P 2 and P 3 that form a triangle, a point P can be defined by or then the point will be within (or on the boundary) of the triangle. If
35
168 471 Computer Graphics, KKU. Lecture 435 Convex VS Non-Convex Convex SetNon-Convex Set
36
168 471 Computer Graphics, KKU. Lecture 436 Coordinates of a point in the frame Given a frame, a point P can be written asWhere O is an origin of the frame and so the point can be written uniquely as The set of values are the coordinates of P relative to the frame.
37
168 471 Computer Graphics, KKU. Lecture 437 Cartesian Frames The 2D standard Cartesian frame, denoted as, has A point P = will has the coordinate (x,y) relative to this frame A Cartesian frame with any dimension consists of (0,0,…..,0) as an origin,,…, as basis vectors
38
168 471 Computer Graphics, KKU. Lecture 438 Examples Given the frame which has the origin (0,0) and the vectors u = and v =, the point P that has its coordinate (5,3) in this frame, can be written as which is the Cartesian coordinate (8,3). or
39
168 471 Computer Graphics, KKU. Lecture 439 Matrix Representation of Points Given a frame in an affine space, we can write a point P uniquely as or
40
168 471 Computer Graphics, KKU. Lecture 440 Matrix Representation of Vectors Given a frame in an affine space, we can write a vector v uniquely as or
41
168 471 Computer Graphics, KKU. Lecture 441 Converting between Frames Suppose that we have the point P, with coordinates (3,2) in the frame. What are the coordinates of the point in the frame ? Consider the two frames and _ where
42
168 471 Computer Graphics, KKU. Lecture 442
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.