Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSC 202 I NTRO. T O C OMPUTER ANIMATION Techniques and mathematical algorithms By Uzoma James Chikwem.

Similar presentations


Presentation on theme: "CSC 202 I NTRO. T O C OMPUTER ANIMATION Techniques and mathematical algorithms By Uzoma James Chikwem."— Presentation transcript:

1 CSC 202 I NTRO. T O C OMPUTER ANIMATION Techniques and mathematical algorithms By Uzoma James Chikwem

2 S ALARY OF M ATHEMATICIANS The power of Problem Solving

3 M ATH IN C OMPUTER A NIMATION Math is used to perform many Animation Techniques Perception of Vision Character Position & Effects Object Motion Texture Mapping Mathematical Algorithms Transformatoions Vectors Matrices Curved surfaces Polygons

4 T ECHNICAL B ACKGROUND (A LGORITHMS ) Section will cover: Basics of computer graphic display pipeline Coordinate spaces or systems Transformations Perspective Mathematical Algorithms 2D Space 3D Space Matrices Polygons Curves

5 D ISPLAY P IPELINE Refers to an object created in it’s own defined space going through transformations to be displayed on screen. Object space is where an object is originally defined. World space is where the object can be viewed, or environment. Eye Space simply relates to what the camera or viewer sees, which is transformed into image space. Lastly the data is translated, rotated, and scaled into the screen space, or pixels.

6 T RANSFORMATIONS, OR CHANGE, IN COORDINATES OVER TIME CREATES ANIMATION Point(x,y) MOVED by amount Dx, Dy to new location (x’,y’) Point (x,y) enlarges, shrinks, reflects to new location (x’,y’) TRANSLATION IN 2DSCALING IN 2D

7 T RANSFORMATIONS, OR CHANGE, IN COORDINATES OVER TIME CREATES ANIMATION Scales an object inversely usually by multiplying by a negative scalar. Flips an object off a point, line or plane Very useful to know when modeling in 3D as well as animating in 2D REFLECTION IN 2D

8 T RANSFORMATIONS, OR CHANGE, IN COORDINATES OVER TIME CREATES ANIMATION REFLECTION IN 2D These rules should help in calculating new location.

9 T RANSFORMATIONS, OR CHANGE, IN COORDINATES OVER TIME CREATES ANIMATION Rotates Point(x,y) about the origin of the scene, not object. Theta represents the angle of change. To better visualize think of the unit circle used in trig class to help graph sine, cosine and tangent. ROTATION IN 2D

10 T RANSFORMATIONS, OR CHANGE, IN COORDINATES OVER TIME CREATES ANIMATION Remember graphing these in Precalc? Now you get to visualize them and how each angle is used to animate rotation. Remember these angles and their coordinates to help better understand. ROTATION IN 2D

11 T RANSFORMATIONS, OR CHANGE, IN COORDINATES OVER TIME CREATES ANIMATION ROTATION IN 2D

12 2D C OORDINATE SYSTEM Commonly used to graph algorithms to show Constant motion Acceleration/deceleration No movement Programming Math Javascript C++ OpenGL Python Plenty more… for ( i = 0; i <= 1; i += 0.1 ) { x = i; y = i; … }

13 2D C OORDINATE SYSTEM for ( i = 0; i <= 1; i += 0.1 ) { x = i; y = i * i; } for ( i = 0; i <= 1; i += 0.1 ) { x = i; y = Math.pow( i, 4 ); }

14 S INE WAVES FOR SMOOTH ANIMATION var counter = 0; // 100 iterations var increase = Math.PI / 100; for ( i = 0; i <= 1; i += 0.01 ) { x = i; y = Math.sin(counter); counter += increase; } var counter = 0; // 100 iterations var increase = Math.PI *?? / 100; for ( i = 0; i <= 1; i += 0.01 ) { x = i; y = Math.sin(counter); counter += increase; }

15 TRANSFORMATION S ROTATION TRANSLATION SCALE


Download ppt "CSC 202 I NTRO. T O C OMPUTER ANIMATION Techniques and mathematical algorithms By Uzoma James Chikwem."

Similar presentations


Ads by Google