Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jinxiang Chai CSCE441: Computer Graphics Coordinate & Composite Transformations 0.

Similar presentations


Presentation on theme: "Jinxiang Chai CSCE441: Computer Graphics Coordinate & Composite Transformations 0."— Presentation transcript:

1 Jinxiang Chai CSCE441: Computer Graphics Coordinate & Composite Transformations 0

2 Outline 2D/3D Coordinate transformation 2D/3D Composite transformation Required readings: HB 7-8, 9-6 1

3 Image space Coordinate Transform: 3D Geometry Pipeline 2 Normalized project space View space World spaceObject space Aspect ratio & resolution Focal length Rotate and translate the camera

4 Coordinate Transformation: 3D Modeling/Design Coordinate transformation from one reference frame to another 3

5 Coordinate Transformation: Animation/Robotics How to model 2D movement of animated characters or robots? 4 Click herehere

6 Coordinate Transformation Coordinate transformation from one reference frame to another 5

7 Coordinate Transformation Coordinate transformation from one reference frame to another 6 Local reference frame

8 Coordinate Transformation Coordinate transformation from one reference frame to another 7 Local reference frame Global reference frame

9 Coordinate Transformation Coordinate transformation from one reference frame to another ? 8 Local reference frame Global reference frame

10 Review – Vector Operations Dot Product 9

11 Review – Vector Operations Dot Product: measuring similarity between two vectors 10

12 Review – Vector Operations Dot Product: measuring similarity between two vectors 11

13 Review – Vector Operations Dot Product: measuring similarity between two vectors Unit vector: 12

14 Review – Vector Operations Dot Product: measuring similarity between two vectors 13

15 Review – Vector Operations Dot Product: measuring similarity between two vectors 14

16 Review – Vector Operations Cross Product: measuring the area determined by two vectors 15

17 Review – Vector Operations Cross Product: measuring the area determined by two vectors 16

18 2D Coordinates 2D Cartesian coordinate system: 17

19 2D Coordinate Transformation 2D Cartesian coordinate system: 18

20 2D Coordinate Transformation 2D Cartesian coordinate system: any 2D vector can be represented as 19

21 2D Coordinate Transformation 2D Cartesian coordinate system: P: (x,y) 20

22 2D Coordinate Transformation 2D Cartesian coordinate system: P: (x,y) 21

23 2D Coordinate Transformation Transform object description from to p 22

24 2D Coordinate Transformation Transform object description from to p 23 Given the coordinates (x’,y’) in i’j’ - how to compute the coordinates (x,y) in ij?

25 2D Coordinate Transformation Transform object description from to p 24 Given the coordinates (x’,y’) in i’j’ - how to compute the coordinates (x,y) in ij?

26 2D Coordinate Transformation Transform object description from to p 25 Given the coordinates (x’,y’) in i’j’ - how to compute the coordinates (x,y) in ij?

27 2D Coordinate Transformation Transform object description from to p 26

28 2D Coordinate Transformation Transform object description from to p 27

29 2D Coordinate Transformation Transform object description from to p 28

30 2D Coordinate Transformation Transform object description from to p 29

31 2D Coordinate Transformation Transform object description from to p 30

32 2D Coordinate Transformation Transform object description from to p 31

33 2D Coordinate Transformation Transform object description from to p 32

34 2D Coordinate Transformation Transform object description from to p 33

35 2D Coordinate Transformation Transform object description from to p 34

36 2D Coordinate Transformation Transform object description from to p 35

37 2D Coordinate Transformation Transform object description from to p 36

38 2D Coordinate Transformation Transform object description from to p 37

39 2D Coordinate Transformation Transform object description from to p 38

40 2D Coordinate Transformation p 39 What does this column vector mean?

41 2D Coordinate Transformation Transform object description from to p 40 What does this column vector mean? Vector i’ in the new reference system

42 2D Coordinate Transformation Transform object description from to p 41 What does this column vector mean?

43 2D Coordinate Transformation Transform object description from to p 42 What does this column vector mean? Vector j’ in the new reference system

44 2D Coordinate Transformation Transform object description from to p 43 What does this column vector mean?

45 2D Coordinate Transformation Transform object description from to p 44 What does this column vector mean? The old origin in the new reference system

46 2D Coordinate Transformation 2D translation p 45

47 2D Coordinate Transformation 2D translation p ? ? ? ? 46

48 2D Coordinate Transformation 2D translation p 1 0 0 1 47

49 2D Coordinate Transformation 2D translation&rotation p ? 48

50 2D Coordinate Transformation 2D translation&rotation p ? 49

51 2D Coordinate Transformation 2D translation&rotation p 50

52 2D Coordinate Transformation 2D translation&rotation p ? 51

53 2D Coordinate Transformation 2D translation&rotation p 52

54 2D Coordinate Transformation 2D translation&rotation p ? 53

55 2D Coordinate Transformation 2D translation&rotation p 54

56 2D Coordinate Transformation An alternative way to look at the problem P=[x,y] 55 - set up a transformation that superimposes the x’y’ axes onto the xy axis

57 2D Coordinate Transformation An alternative way to look at the problem P=[x,y] 56 - set up a transformation that superimposes the x’y’ axes onto the xy axis

58 2D Coordinate Transformation An alternative way to look at the problem P=[x,y] 57 - set up a transformation that superimposes the x’y’ axes onto the xy axis

59 2D Coordinate Transformation An alternative way to look at the problem This transforms the point from (x,y) to (x’,y’) p 58

60 2D Coordinate Transformation An alternative way to look at the problem This transforms the point from (x,y) to (x’,y’) How to transform the point from (x’,y’) to (x,y)? p 59

61 2D Coordinate Transformation An alternative way to look at the problem This transforms the point from (x,y) to (x’,y’) How to transform the point from (x’,y’) to (x,y)? Invert the matrix! p 60

62 2D Coordinate Transformation An alternative way to look at the problem This transforms the point from (x,y) to (x’,y’) How to transform the point from (x’,y’) to (x,y)? Invert the matrix! p 61

63 2D Coordinate Transformation An alternative way to look at the problem This transforms the point from (x,y) to (x’,y’) How to transform the point from (x’,y’) to (x,y)? Invert the matrix! p 62

64 2D Coordinate Transformation An alternative way to look at the problem This transforms the point from (x,y) to (x’,y’) How to transform the point from (x’,y’) to (x,y)? Invert the matrix! p 63

65 2D Coordinate Transformation An alternative way to look at the problem This transforms the point from (x,y) to (x’,y’) How to transform the point from (x’,y’) to (x,y)? Invert the matrix! p 64

66 2D Coordinate Transformation Same results! p 65

67 2D Coordinate Transformation 2D translation&rotation p 66

68 2D Coordinate Transformation 2D translation&rotation p 67

69 2D Coordinate Transformation 2D translation&rotation p 68

70 2D Coordinate Transformation 2D translation&rotation p 69

71 2D Coordinate Transformation 2D translation&rotation p 70

72 2D Coordinate Transformation 2D translation&rotation p 71

73 3D Coordinate Transformation Transform object description from to p 72

74 2D Coordinate Transformation Transform object description from to p 73

75 3D Coordinate Transformation Transform object description from to p 74

76 3D Coordinate Transformation Transform object description from to p 75

77 3D Coordinate Transformation Transform object description from to 76 p

78 3D Coordinate Transformation Transform object description from to 77 x y z

79 Composite 2D Transformation How to model 2D movement of characters or robots? 78 Click herehere

80 Composite 2D Transformation A 2D lamp character 79

81 Composite 2D Transformation A 2D lamp character – skeleton size 80

82 Composite 2D Transformation How can we draw the character given the pose ? 81

83 Composite 2D Transformation How can we draw the character given the pose ? 82 - This requires computing the global coordinates for any point on the character. - But we only have local coordinates of points. - So how can we map the local coordinates to the global coordinates?

84 Articulated Character Local reference frames with a default pose (0,0,0,0,0,0)

85 Composite 2D Transformation What’s the pose? 84

86 Composite 2D Transformation What’s the pose? 85

87 Composite 2D Transformation A 2D lamp character Given,, how to compute the global position of a point (e.g., A) based on its local coordinates? ? 86

88 Composite 2D Transformation What’s local coordinate ? ? 87

89 Composite 2D Transformation What’s local coordinate ? ? 88

90 Composite 2D Transformation What’s the current coordinate A ? ? 89

91 Composite 2D Transformation What’s the current coordinate A ? ? 90

92 Composite 2D Transformation What’s the current coordinate A ? ? 91

93 Composite 2D Transformation What’s the current coordinate A ? ? 92

94 Composite 2D Transformation What’s the current coordinate A ? ? 93

95 Composite 2D Transformation What’s the current coordinate A ? 94

96 How to Animate the Character? A 2D lamp character 95

97 How to Animate the Character? Keyframe animation - Manually pose the character by choosing appropriate values for - Linearly interpolate the inbetween poses. - Works for any types of articulated characters! 96

98 Composite 3D Transformation Similarly, we can easily extend composite transformation from 2D to 3D 97

99 Composite 3D Transformation 98


Download ppt "Jinxiang Chai CSCE441: Computer Graphics Coordinate & Composite Transformations 0."

Similar presentations


Ads by Google