Presentation is loading. Please wait.

Presentation is loading. Please wait.

Geometric Objects and Transformations Geometric Entities Representation vs. Reference System Geometric ADT (Abstract Data Types)

Similar presentations


Presentation on theme: "Geometric Objects and Transformations Geometric Entities Representation vs. Reference System Geometric ADT (Abstract Data Types)"— Presentation transcript:

1 Geometric Objects and Transformations Geometric Entities Representation vs. Reference System Geometric ADT (Abstract Data Types)

2 Goals  Coordinate-free representation of objects  Homogeneous coordinates  Distinction of an object from its representation

3 Scalars, Points, and Vectors  Geometric View  Mathematical View –Vector –Affine Spaces  Computer-Science View  Other issues –Geometric ADTs –Lines –Affine Sums –Convexity –Dot and Cross Products –Planes

4 Geometric View  Point: a location in space  Scalar: real number  Vector: directed line segment Directed Line Segment That Connects Points

5 Identical Vectors

6 Combination of Directed Line Segments

7 A Dangerous Representation of a Vector

8 Mathematical View  Vector space: vectors and scalars  Operations –Scalar-vector multiplication –Vector-vector addition  Affine space: vector space + point –Vector-point addition (or point-point subtraction)  Euclidean space: affine space + measure of size or distance

9 Point-Point Subtraction

10 Computer-Science View  Scalars, points, and vectors as abstract data types (ADTs)  ADT –Object-oriented –Data and operations  Object declarations vector u,v; point p,q; scalar a,b; q = p + a * v;

11 Use of the Head-to-Tail Axiom - - -

12 Lines  The sum of a point and a vector (or subtraction of two points) leads to the notion of a line in an affine space.

13 Line in an Affine Space

14 Affine Operations  In an affine space, scalar-vector multiplication vector-vector addition are defined. However, point-point addition and scalar-point multiplication are not.  Affine addition has certain elements of the above two latter operations.

15 Affine Addition

16 Convexity  A convex object is one for which any point lying on the line segment connecting any two points in the object is also in the object. Line segment that connects two points

17 Convex Hull  Geometrically, a convex hull is the set of points that we form by stretching a tight fitting surface over the given set of points – shrink wrapping the points.

18 Dot Product and Projection u

19 Cross Product  Right-handed coordinate system

20 Formation of a Plane  Normal vector:

21 Three-Dimensional Primitives  Three features characterize three-dimensional objects that fit well with existing graphics hardware and software: –Objects described by surfaces and hollow – 2D primitives modeling 3D primitives; –Objects can be specified through vertices – efficient implementation; –The objects either are composed of or can be approximated by flat convex polygons.

22 Primitives in Three Dimensions

23 Vector Derived From Three Basis Vectors w

24 Coordinate Systems

25 Changes of Coordinate Systems

26 Changes of Coordinate Systems (2)

27 Rotation and Scaling of a Basis  The changes in basis leave the origin unchanged. We can use them to represent rotation and scaling of a set of basis vectors to derive another basis set.

28 Translation of a Basis  However, a simple translation of the origin, or change of frame cannot be represented in this way.  Homogeneous coordinates.

29 Example of Change of Representation

30 Homogeneous Coordinates  Represent frame change (translation)  Avoid point vs. vector confusion

31 Example of Change in Frames

32 Example (continued)

33 Camera and World Frames In OpenGL, the model-view matrix positions the world frame relative to the camera frame.

34 One Frame of Cube Animation Tasks: Modeling (8 vertices, 12 edges) Converting to the camera frame Clipping Projecting Removing hidden surfaces Rasterizing

35 Traversal of the Edges of a Polygon Counterclockwise: (0,3,2,1) (3,2,1,0) (2,1,0,3) (1,0,3,2) Outward facing

36 Vertex-List Representation of a Cube

37 Bilinear Interpolation

38 Projection of Polygon A polygon is first projected onto the two-dimensional plane and then filled with colors.

39 Scan-Line Interpolation OpenGL Approach

40 Transformation

41 Translation

42 Two-Dimensional Rotation

43 Rotation About a Fixed Point

44 Three-Dimensional Rotation

45 Non-Rigid Body Transformation

46 Uniform and Non-uniform Scaling

47 Effect of Scale Factor

48 Reflection

49 Shear

50 Computation of the Shear Matrix X’, y’

51 Application of Pipeline Transformation

52 Rotation of a Cube About Its Center

53 Rotation of a Cube About Its Center – Sequence of Transformation –

54 Rotation of a Cube About the z Axis

55 Rotation of a Cube About y Axis

56 Rotation of a Cube About The x Axis

57 Scene of Simple Objects Instance transformation Instead of defining each object and its size, position, orientation, we define the object types and create each instance with its size, position, orientation.

58 Instance Transformation

59 Rotation of a Cube About an Arbitrary Axis

60 Movement of The Fixed Point to Origin

61 Sequence of Rotations

62 Direction Angles

63 Computation of the x Rotation

64 Computation of the y Rotation

65 Current Transformation Matrix (CTM)

66 Model-View and Projection Matrices CTM: current transformation matrix

67 Symmetric Orientation of Cube  Start with a cube centered at the origin and aligned with the coordinate axes. Find a rotation matrix that will orient the cube symmetrically, as shown here.


Download ppt "Geometric Objects and Transformations Geometric Entities Representation vs. Reference System Geometric ADT (Abstract Data Types)"

Similar presentations


Ads by Google