Lecture 4. Animation: Procedure and Case Studies

Size: px
Start display at page:

Download "Lecture 4. Animation: Procedure and Case Studies"

Transcription

1 Lecture 4 Animation: Procedure and Case Studies

2 Recall: Representation of 2D entities in OPenGL All the entities are represented using coordinates of the vertices. Therefore, any animation is carried out must be based on the coordinates of the vertices.

3 Procedure i. Describe the situation ii. Represent the situation as OpenGL representation iii. Mathematize the situation using the engineering knowledge iv. Create the pseudo code. This procedure will further clarify the problem prior the actual code writing. Unforeseen problem/s may occur during the actual programming processes.

4 Case I: Simple deflection When the cantilever beam is subjected to load F, the deflection of the beam can be calculated using the following equation, which x is the distance from the wall to specified element. y( x) 2 Fx 6EI ( x 3l) Your task is to animate the physical simulation of the deflection. The color of the elements should be changes according to following condition of the deflection 0 y( x) 1 y x) 1 ( y( x) 2 2 Element color should be Blue (glcolor3f (0,0,1)) Element color should be yellow (glcolor3f(1, 1, 0)) Element color should be red (glcolor3f(1,0,0))

5 Case I: Sliding Collar Figure shows a slider that can move along designated path. When the force is exerted to move the slider, the slider will move to and fro the path without any loss of energy (assumption). Your task is to animate the movement and the user will determine the force exerted.

6 Case I: Sliding Collar i. Describe the situation The slider will travel forward or backward. The direction of the movement will change once the slider hits the wall. The animation will be continuous. ii. Represent the situation as OpenGL representation Wall two straight line (GL_LINE) Slider 4 lines with the end point that connects to the collar will be variable. (only x coordinate) Collar rectangle with 4 vertices that are variables

7 Case I: Sliding Collar iii. Mathematize the situation using the engineering knowledge The collar will travel along the forward and backward. This can be carried out by the changing the x coordinates of the vertices of the color. However, the changing of the x coordinate relies on the direction of the travelling. Therefore flag direction needed and this flag will change its value once the collar hits wall. a. Draw the collar with ( x i + increment, y i ) on all the vertices. b. Set the dir_flag_to_right == 1, increment will be positive c. When the vertices on the right side touches the right wall, the direction of motion will change to left If right_collar_vertices.x >= right_line.x, the dir_to_right will be set to 0 and the increment will be deducted from xi. ( x i - increment, y i ) d. The collar will continue to move to the left until the left side of the collar touches the left wall

8 Case I: Sliding Collar iii. Mathematize the situation using the engineering knowledge d. The collar will continue to move to the left until the left side of the collar touches the left wall. if (left_collar_vertex.x <= left wall.x ) the dir_to_right will be set to 1 and the increment will be deducted from xi. ( x i + increment, y i ) e. The right side silde is drawn by two right from ( right_wall.x, yi ) to (right_collar_vertex.x, yi ) and to left side of the slider is drawn from (left_wall.x, yi ) to (left_collar_vertex.x, yi )

9 Case I: Sliding Collar iv. Create the pseudo code. void myidle() If (dir_to_right == 1) incr_x += 0.001; else incr_x -= 0.001; void display( ) glbegin //draw wall using GL_LINE glend glbegin // draw the collar COLLAR using GL_POLYGON with four vertices (xi + incr+x, yi ) if (collar_right_vertices.x >= right_wall.x ) dir_to_right = 0; glutpostredisplay(); glend if (collar_left_vertices.x <= _left_wall.x ) dir_to_right = 1; glbegin // draw the slide slider on the left from wall_left.x to collar_left.x slider on the righ from collar_right.x TO wall_right.x glend glutswapbuffers();

10 Case II: Simple deflection i. Describe the situation When F is applied on the cantilever beam, the beam will bend and results in bending stresses. The deflection of the beam can be calculated using the given formula. The formula will calculate the deflection as point x. The detail deflection can be calculated by dividing the beam into small segment of dx. dx y(dx)

11 Case II: Simple deflection ii. Represent the situation as OpenGL representation The problem can be represented One line can represent the wall (using GL_LINE) The beam is divided into small segments rectangle. This is because when the deflection is carried out, the translation and the color for each segment can be done individually. The smaller the segments is, the smoother the deflection will be. Entity can be drawing using GL_POLYGON. For each polygon, the vertices will be represented as ( x, y + def[i] ): x and y is set based on the position of the polygon def[i]: variable that can be used for translation of the polygon for animation proposes. Assumption, the deflection is assumed at the center of the polygon 0 1 n (xi, y1 + def[i]) dx (xi + dx, y1 + def[i]) (xi, y2 + def[i]) (xi + dx, y2 + def[i])

12 Case II: Simple deflection iii. Mathematize the situation using the engineering knowledge Firstly, force F must be set either predefined or user input. For each segment i, def[i] is calculated based on the deflection at the center of the polygon. Therefore, the maximum deflection for segment i can be calculated. Set the number iteration needed to complete the animation process, let say L. Therefore for each frame, the increment of the deflection for each segment is def[i]/l. When the animation is carried out, the color of the polygon is based deflection of the segment on that frame. (xi, y1 + def[i]) dx (xi + dx, y1 + def[i]) (xi, y2 + def[i]) (xi + dx, y2 + def[i])

13 Case II: Simple deflection iii. Mathematize the situation using the engineering knowledge a. Calculate the maximum deflection for each segment i def [ i] y( xi 0.5dx) b. Increment for each deflection at segment. inc _ def [ i] def [ i]/ L; if ( inc _ def [ i] def [ i]) inc _ def [ i] def [ i]; c. The polygon can be drawn using the following coordinates of the polygon will be (xi, y1 + inc_def[i]) (xi + dx, y1 + inc_def[i]) (xi, y2 + inc_def[i]) (xi + dx, y2 + inc_def[i])

14 Case II: Simple deflection iv. Mathematize the situation using the engineering knowledge d. Finally, the polygon can colored based on the value of inc_def[i] 0 inc _ def [ i] 1 glcolor3f (0,0,1) 1 inc _ def [ i] 2 glcolor3f (1,1,1) inc _ def [ i] glcolor3f (1,0,0) 2

15 Case II: Simple deflection iv. Create the pseudo code. void display( ) glbegin //draw wall using GL_LINE glend for ( I == 0; I < no_segment ; i++ ) if ( condition to select color )glcolor3f( ); else if ( ) glcolor3f( ); else glbegin // start draw for each segment draw each segment using inc_def[i] variables void myidle() for ( k == 0; k < no_inrement ; k++ ) inc_def[i] += def[i]/no_increment if ( inc_def[i] >= def[i]) inc_def[i] = def[i] glutpostredisplay(); glend glutswapbuffers();

16 Case III: Bouncing ball A ball drops from h height is governed by the following equation. Potential energy at height h = mgh Kinetics energy when the ball reaches the floor = 1/2 m v 2. Therefore v = ( g h ) 0.5 Your task is to animate the physical simulation of the ball dropping until it stops. Assume that 15% of the energy is lost when the ball hits the floor

17 Case III: Bouncing ball i. Describe the situation When the ball is released from height, the speed of the ball increases until it hits the ground. The ball will bounce with the assumption that 15% is lost. Once the ball hits the ground, it will bounce, but can only reach 0.85 of the previous height. The process goes on and the rebound height become smaller. ii. Represent the situation as OpenGL representation The ground can be represented as one line using GL_LINE. The ball is represented using a number of straight lines and the coordinates of the vertices can be calculated using circle equations. The lines can be connected using either GL_LINE_LOOP or GL_POLYGON.

18 Case III: Bouncing ball iii. Mathematize the situation using the engineering knowledge The bouncing of the ball can be animated by varying the y coordinate of the ball using delta time. The ball will be translated downward with delta_y(t) (or negative delta_y(t)) of the y coordinates of the ball.the ball will stop when time is equal is time taken to reach the ground (t_max). Then, the ball will bounce back to the position by delta_y(t) upward until it reached 0.85h. When the ball bounces upward, the delta_y(t) will be 0.85 delta_y(t). The process will continue downward and bounce upward to 0.85 i where i is the number of rebound. The bouncing process can be stop when the bounced height reaches certain height (min_height)

19 Case III: Bouncing ball iii. Mathematize the situation using the engineering knowledge a. The frame is based on the delta_time. Set int no_bounce = 0 b. Calculate the time for the ball to reach ground. t _ max[ no _ bounce] 2(0.85) no_ bounce where r: radius of the ball c. Therefore, for each delta_time (Dt) in upward position delta _ y( Dt) u( Dt) 0.5(9.81)( Dt) where: u = 0 d. The position of the ball will be ( x, y delta_y[dt]) g 2 ( h r) e. When Dt = t_max[], the ball bounces, set no_bounce = no_bounce + 1;

20 Case III: Bouncing ball iii. Mathematize the situation using the engineering knowledge f. The frame is based on the delta_time = 0. b. Calculate the time for the ball to reach ground. t _ max[ no _ bounce] 2(0.85) no_ bounce g ( h r) where r: radius of the ball g. Therefore, for each delta_time (Dt) in downward position delta _ y( Dt) u( Dt) 0.5(9.81)( Dt) 2 where: no_ bounce ( g(0.85 h h. The position of the ball will be ( x, y ( 0.85 no_bounce h -delta_y[dt]) u )) 0.5 i. When Dt = t_max[], the ball reaches the highest point and starts to go downward. Repeat step a h until h_min > (0.85) no_bounce h (Note: flag upward and downward, end_animate are used to differentiate the usage of the formula)

21 Case III: Bouncing ball vi. Create the pseudo code. void display( ) glbegin //draw the floor glend t_max = (setting the value of tmax) if ( downward == 1 && end_animate == 0) delta_y = with u = 0 glbegin draw the vertices of the ball ( x, y delta_y ) glend else ( ward == 1 && end_animate == 0) delta_y = with u!= 0 glbegin draw the vertices of the ball ( x, y (h - r - delta_y ) glend if ( dt >= t_max) //setting all the flags no_bounce = no_bounce + 1; if ( downward == 1) downward = 0; upward = 1; else downward = 1; upward = 0; if ( ball.center.y <= floor.y + rad) no_bounce = no_bounce + 1; if (h_min <= height of bouncing ) end_animate = 1; glutswapbuffers(); void myidle() if ( dt < t_max ) dt += 0.001; else if ( end_animate == 0 ) dt = 0; else dt = t_max; glutpostredisplay();

22 Case IV: Car turning right at T junction (Class discussion) At certain distance from the T junction, a car starts to decelerate and stop at the junction. When it is safe to turn, the car accelerate during taking the turn and finally the car travels at constant speed.

Lecture 3. Understanding of OPenGL programming

Lecture 3. Understanding of OPenGL programming Lecture 3 Understanding of OPenGL programming What is OpenGL GL: stands for Graphic Library Software interface for rendering purposes for 2D or 3D geometric data objects. Various Pieces gl: The basic libraries.

More information

Math Learning Center Boise State 2010, Quadratic Modeling STEM 10

Math Learning Center Boise State 2010, Quadratic Modeling STEM 10 Quadratic Modeling STEM 10 Today we are going to put together an understanding of the two physics equations we have been using. Distance: Height : Recall the variables: o acceleration o gravitation force

More information

Displacement-time and Velocity-time Graphs

Displacement-time and Velocity-time Graphs PhysicsFactsheet April Number Displacement- and Velocity- Graphs This Factsheet explains how motion can be described using graphs, in particular how - graphs and - graphs can be used. Displacement- graphs

More information

pygame Lecture #2 (Examples: movingellipse, bouncingball, planets, bouncingballgravity)

pygame Lecture #2 (Examples: movingellipse, bouncingball, planets, bouncingballgravity) pygame Lecture #2 (Examples: movingellipse, bouncingball, planets, bouncingballgravity) MOVEMENT IN PYGAME I. Realizing the screen is getting redrawn many times. Let's take a look at the key portion of

More information

Drawing Primitives. OpenGL basics

Drawing Primitives. OpenGL basics CSC 706 Computer Graphics / Dr. N. Gueorguieva 1 OpenGL Libraries Drawing Primitives OpenGL basics OpenGL core library OpenGL32 on Windows GL on most unix/linux systems (libgl.a) OpenGL Utility Library

More information

Semester 2 Review Problems will be sectioned by chapters. The chapters will be in the order by which we covered them.

Semester 2 Review Problems will be sectioned by chapters. The chapters will be in the order by which we covered them. Semester 2 Review Problems will be sectioned by chapters. The chapters will be in the order by which we covered them. Chapter 9 and 10: Right Triangles and Trigonometric Ratios 1. The hypotenuse of a right

More information

Lecture 2 CISC440/640 Spring Department of Computer and Information Science

Lecture 2 CISC440/640 Spring Department of Computer and Information Science Lecture 2 CISC440/640 Spring 2015 Department of Computer and Information Science Today s Topic The secrets of Glut-tony 2 So let s do some graphics! For the next week or so this is your world: -1 1-1 1

More information

OpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives.

OpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives. D Graphics Primitives Eye sees Displays - CRT/LCD Frame buffer - Addressable pixel array (D) Graphics processor s main function is to map application model (D) by projection on to D primitives: points,

More information

Collisions/Reflection

Collisions/Reflection Collisions/Reflection General Collisions The calculating whether or not two 2D objects collide is equivalent to calculating if the two shapes share a common area (intersect). For general polygons this

More information

Proceedings of the Third International DERIVE/TI-92 Conference

Proceedings of the Third International DERIVE/TI-92 Conference Using the TI-92 and TI-92 Plus to Explore Derivatives, Riemann Sums, and Differential Equations with Symbolic Manipulation, Interactive Geometry, Scripts, Regression, and Slope Fields Sally Thomas, Orange

More information

Lecture 5b. Transformation

Lecture 5b. Transformation Lecture 5b Transformation Refresher Transformation matrices [4 x 4]: the fourth coordinate is homogenous coordinate. Rotation Transformation: Axis of rotation must through origin (0,0,0). If not, translation

More information

OUTPUT PRIMITIVES. CEng 477 Introduction to Computer Graphics METU, 2007

OUTPUT PRIMITIVES. CEng 477 Introduction to Computer Graphics METU, 2007 OUTPUT PRIMITIVES CEng 477 Introduction to Computer Graphics METU, 007 Recap: The basic forward projection pipeline: MCS Model Model Modeling Transformations M M 3D World Scene Viewing Transformations

More information

Without fully opening the exam, check that you have pages 1 through 11.

Without fully opening the exam, check that you have pages 1 through 11. Name: Section: Recitation Instructor: INSTRUCTIONS Fill in your name, etc. on this first page. Without fully opening the exam, check that you have pages 1 through 11. Show all your work on the standard

More information

Two-Dimensional Motion

Two-Dimensional Motion Two-Dimensional Motion Objects don't always move in a straight line. When an object moves in two dimensions, we must look at vector components. The most common kind of two dimensional motion you will encounter

More information

Evaluating Logical Expressions

Evaluating Logical Expressions Review Hue-Saturation-Brightness vs. Red-Green-Blue color Decimal, Hex, Binary numbers and colors Variables and Data Types Other "things," including Strings and Images Operators: Mathematical, Relational

More information

MATH 31A HOMEWORK 9 (DUE 12/6) PARTS (A) AND (B) SECTION 5.4. f(x) = x + 1 x 2 + 9, F (7) = 0

MATH 31A HOMEWORK 9 (DUE 12/6) PARTS (A) AND (B) SECTION 5.4. f(x) = x + 1 x 2 + 9, F (7) = 0 FROM ROGAWSKI S CALCULUS (2ND ED.) SECTION 5.4 18.) Express the antiderivative F (x) of f(x) satisfying the given initial condition as an integral. f(x) = x + 1 x 2 + 9, F (7) = 28.) Find G (1), where

More information

Introduction to Computer Graphics with OpenGL/GLUT

Introduction to Computer Graphics with OpenGL/GLUT Introduction to Computer Graphics with OpenGL/GLUT What is OpenGL? A software interface to graphics hardware Graphics rendering API (Low Level) High-quality color images composed of geometric and image

More information

Direction Fields; Euler s Method

Direction Fields; Euler s Method Direction Fields; Euler s Method It frequently happens that we cannot solve first order systems dy (, ) dx = f xy or corresponding initial value problems in terms of formulas. Remarkably, however, this

More information

Overview of Computer Graphics

Overview of Computer Graphics Application of Computer Graphics UNIT- 1 Overview of Computer Graphics Computer-Aided Design for engineering and architectural systems etc. Objects maybe displayed in a wireframe outline form. Multi-window

More information

2.1 Quadraticsnts.notebook. September 10, 2018

2.1 Quadraticsnts.notebook. September 10, 2018 1 A quadratic function is a polynomial function of second degree. The graph of a quadratic function is called a parabola. 2 Standard Form: Intercept Form: Vertex Form: f(x) = a(x h) 2 + k vertex: (h, k)

More information

Section 9.3 Graphing Quadratic Functions

Section 9.3 Graphing Quadratic Functions Section 9.3 Graphing Quadratic Functions A Quadratic Function is an equation that can be written in the following Standard Form., where a 0. Every quadratic function has a U-shaped graph called a. If the

More information

Computer Graphics. Making Pictures. Computer Graphics CSC470 1

Computer Graphics. Making Pictures. Computer Graphics CSC470 1 Computer Graphics Making Pictures Computer Graphics CSC470 1 Getting Started Making Pictures Graphics display: Entire screen (a); windows system (b); [both have usual screen coordinates, with y-axis y

More information

Name: SID: LAB Section:

Name: SID: LAB Section: Name: SID: LAB Section: Lab 9 - Part 1: Particle Simulations In particle simulations, each particle s dynamic state (position, velocity, acceleration, etc) is modeled independently of the particle s visual

More information

Patterning Math Lab 4a

Patterning Math Lab 4a Patterning Math Lab 4a This lab is an exploration of transformations of functions, a topic covered in your Precalculus textbook in Section 1.5. As you do the exercises in this lab you will be closely reading

More information

Since a projectile moves in 2-dimensions, it therefore has 2 components just like a resultant vector: Horizontal Vertical

Since a projectile moves in 2-dimensions, it therefore has 2 components just like a resultant vector: Horizontal Vertical Since a projectile moves in 2-dimensions, it therefore has 2 components just like a resultant vector: Horizontal Vertical With no gravity the projectile would follow the straight-line path (dashed line).

More information

CS 450: COMPUTER GRAPHICS REVIEW: DRAWING LINES AND CIRCLES SPRING 2015 DR. MICHAEL J. REALE

CS 450: COMPUTER GRAPHICS REVIEW: DRAWING LINES AND CIRCLES SPRING 2015 DR. MICHAEL J. REALE CS 450: COMPUTER GRAPHICS REVIEW: DRAWING LINES AND CIRCLES SPRING 2015 DR. MICHAEL J. REALE DRAWING PRIMITIVES: LEGACY VS. NEW Legacy: specify primitive in glbegin() glbegin(gl_points); glvertex3f(1,5,0);

More information

CS 4731 Lecture 3: Introduction to OpenGL and GLUT: Part II. Emmanuel Agu

CS 4731 Lecture 3: Introduction to OpenGL and GLUT: Part II. Emmanuel Agu CS 4731 Lecture 3: Introduction to OpenGL and GLUT: Part II Emmanuel Agu Recall: OpenGL Skeleton void main(int argc, char** argv){ // First initialize toolkit, set display mode and create window glutinit(&argc,

More information

Sketching graphs of polynomials

Sketching graphs of polynomials Sketching graphs of polynomials We want to draw the graphs of polynomial functions y = f(x). The degree of a polynomial in one variable x is the highest power of x that remains after terms have been collected.

More information

Semester 2 Review Problems will be sectioned by chapters. The chapters will be in the order by which we covered them.

Semester 2 Review Problems will be sectioned by chapters. The chapters will be in the order by which we covered them. Semester 2 Review Problems will be sectioned by chapters. The chapters will be in the order by which we covered them. Chapter 9 and 10: Right Triangles and Trigonometric Ratios 1. The hypotenuse of a right

More information

(Refer Slide Time: 00:01:27 min)

(Refer Slide Time: 00:01:27 min) Computer Aided Design Prof. Dr. Anoop Chawla Department of Mechanical engineering Indian Institute of Technology, Delhi Lecture No. # 01 An Introduction to CAD Today we are basically going to introduce

More information

Computer Graphics. - Rasterization - Philipp Slusallek

Computer Graphics. - Rasterization - Philipp Slusallek Computer Graphics - Rasterization - Philipp Slusallek Rasterization Definition Given some geometry (point, 2D line, circle, triangle, polygon, ), specify which pixels of a raster display each primitive

More information

CSC 8470 Computer Graphics. What is Computer Graphics?

CSC 8470 Computer Graphics. What is Computer Graphics? CSC 8470 Computer Graphics What is Computer Graphics? For us, it is primarily the study of how pictures can be generated using a computer. But it also includes: software tools used to make pictures hardware

More information

CSCI 4620/8626. Coordinate Reference Frames

CSCI 4620/8626. Coordinate Reference Frames CSCI 4620/8626 Computer Graphics Graphics Output Primitives Last update: 2014-02-03 Coordinate Reference Frames To describe a picture, the world-coordinate reference frame (2D or 3D) must be selected.

More information

Algebra I Notes Graphs of Functions OBJECTIVES: F.IF.A.1 Understand the concept of a function and use function notation. F.IF.A.2.

Algebra I Notes Graphs of Functions OBJECTIVES: F.IF.A.1 Understand the concept of a function and use function notation. F.IF.A.2. OBJECTIVES: F.IF.A.1 Understand the concept of a function and use function notation. Understand that a function from one set (called the domain) to another set (called the range) assigns to each element

More information

Programming of Graphics

Programming of Graphics Peter Mileff PhD Programming of Graphics Introduction to OpenGL University of Miskolc Department of Information Technology OpenGL libraries GL (Graphics Library): Library of 2D, 3D drawing primitives and

More information

CISC 1600, Lab 2.3: Processing animation, objects, and arrays

CISC 1600, Lab 2.3: Processing animation, objects, and arrays CISC 1600, Lab 2.3: Processing animation, objects, and arrays Prof Michael Mandel 1 Getting set up For this lab, we will again be using Sketchpad. sketchpad.cc in your browser and log in. Go to http://cisc1600.

More information

If the ball goes off either the right or left edge, turn the ball around. If x is greater than width or if x is less than zero, reverse speed.

If the ball goes off either the right or left edge, turn the ball around. If x is greater than width or if x is less than zero, reverse speed. Conditionals 75 Reversing the Polarity of a Number When we want to reverse the polarity of a number, we mean that we want a positive number to become negative and a negative number to become positive.

More information

Draw the basic Geometry Objects. Hanyang University

Draw the basic Geometry Objects. Hanyang University Draw the basic Geometry Objects Hanyang University VERTEX ATTRIBUTE AND GEOMETRIC PRIMITIVES Vertex Vertex A point in 3D space, or a corner of geometric primitives such as triangles, polygons. Vertex attributes

More information

ASSIGNMENT BETA COVER SHEET

ASSIGNMENT BETA COVER SHEET Question Done Backpack Ready for test ASSIGNMENT BETA COVER SHEET Name Teacher Topic Teacher/student comment Drill A indices Drill B tangents Drill C differentiation Drill D normals Drill E gradient Section

More information

Appendix E Calculating Normal Vectors

Appendix E Calculating Normal Vectors OpenGL Programming Guide (Addison-Wesley Publishing Company) Appendix E Calculating Normal Vectors This appendix describes how to calculate normal vectors for surfaces. You need to define normals to use

More information

Ray Tracing Basics I. Computer Graphics as Virtual Photography. camera (captures light) real scene. photo. Photographic print. Photography: processing

Ray Tracing Basics I. Computer Graphics as Virtual Photography. camera (captures light) real scene. photo. Photographic print. Photography: processing Ray Tracing Basics I Computer Graphics as Virtual Photography Photography: real scene camera (captures light) photo processing Photographic print processing Computer Graphics: 3D models camera model (focuses

More information

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE528 Computer Graphics: Theory, Algorithms, and Applications CSE528 Computer Graphics: Theory, Algorithms, and Applications Hong Qin State University of New York at Stony Brook (Stony Brook University) Stony Brook, New York 11794--4400 Tel: (631)632-8450; Fax: (631)632-8334

More information

Lecture 3 Advanced Computer Graphics (CS & SE )

Lecture 3 Advanced Computer Graphics (CS & SE ) Lecture 3 Advanced Computer Graphics (CS & SE 233.420) Programming with OpenGL Program Structure Primitives Attributes and States Programming in three dimensions Inputs and Interaction Working with Callbacks

More information

PR3 & PR4 CBR Activities Using EasyData for CBL/CBR Apps

PR3 & PR4 CBR Activities Using EasyData for CBL/CBR Apps Summer 2006 I2T2 Process Page 23. PR3 & PR4 CBR Activities Using EasyData for CBL/CBR Apps The TI Exploration Series for CBR or CBL/CBR books, are all written for the old CBL/CBR Application. Now we can

More information

ERKELEY DAVIS IRVINE LOS ANGELES RIVERSIDE SAN DIEGO SAN FRANCISCO EECS 104. Fundamentals of Computer Graphics. OpenGL

ERKELEY DAVIS IRVINE LOS ANGELES RIVERSIDE SAN DIEGO SAN FRANCISCO EECS 104. Fundamentals of Computer Graphics. OpenGL ERKELEY DAVIS IRVINE LOS ANGELES RIVERSIDE SAN DIEGO SAN FRANCISCO SANTA BARBARA SANTA CRUZ EECS 104 Fundamentals of Computer Graphics OpenGL Slides courtesy of Dave Shreine, Ed Angel and Vicki Shreiner

More information

CS Computer Graphics: OpenGL, Continued

CS Computer Graphics: OpenGL, Continued CS 543 - Computer Graphics: OpenGL, Continued by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) Last time. OpenGL set up Basic structure OpenGL skeleton Callback functions, etc. R.W.

More information

CS Computer Graphics: OpenGL, Continued

CS Computer Graphics: OpenGL, Continued CS 543 - Computer Graphics: OpenGL, Continued by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) Last time. OpenGL set up Basic structure OpenGL skeleton Callback functions, etc. R.W.

More information

Output Primitives Lecture: 3. Lecture 3. Output Primitives. Assuming we have a raster display, a picture is completely specified by:

Output Primitives Lecture: 3. Lecture 3. Output Primitives. Assuming we have a raster display, a picture is completely specified by: Lecture 3 Output Primitives Assuming we have a raster display, a picture is completely specified by: - A set of intensities for the pixel positions in the display. - A set of complex objects, such as trees

More information

RECITATION - 1. Ceng477 Fall

RECITATION - 1. Ceng477 Fall RECITATION - 1 Ceng477 Fall 2007-2008 2/ 53 Agenda General rules for the course General info on the libraries GLUT OpenGL GLUI Details about GLUT Functions Probably we will not cover this part 3/ 53 General

More information

Unit 6 Quadratic Functions

Unit 6 Quadratic Functions Unit 6 Quadratic Functions 12.1 & 12.2 Introduction to Quadratic Functions What is A Quadratic Function? How do I tell if a Function is Quadratic? From a Graph The shape of a quadratic function is called

More information

Graphical Analysis of Kinematics

Graphical Analysis of Kinematics Physics Topics Graphical Analysis of Kinematics If necessary, review the following topics and relevant textbook sections from Serway / Jewett Physics for Scientists and Engineers, 9th Ed. Velocity and

More information

Review for Quarter 3 Cumulative Test

Review for Quarter 3 Cumulative Test Review for Quarter 3 Cumulative Test I. Solving quadratic equations (LT 4.2, 4.3, 4.4) Key Facts To factor a polynomial, first factor out any common factors, then use the box method to factor the quadratic.

More information

WTS TUTORING WTS CALCULUS GRADE : 12 : PROF KWV KHANGELANI SIBIYA : WTS TUTORS CELL NO. : :

WTS TUTORING WTS CALCULUS GRADE : 12 : PROF KWV KHANGELANI SIBIYA : WTS TUTORS CELL NO. : : WTS TUTORING 1 WTS TUTORING WTS CALCULUS GRADE : 12 COMPILED BY : PROF KWV KHANGELANI SIBIYA : WTS TUTORS CELL NO. : 0826727928 EMAIL FACEBOOK P. : kwvsibiya@gmail.com : WTS MATHS & SCEINCE TUTORING WTS

More information

EXERCISE SET 10.2 MATD 0390 DUE DATE: INSTRUCTOR

EXERCISE SET 10.2 MATD 0390 DUE DATE: INSTRUCTOR EXERCISE SET 10. STUDENT MATD 090 DUE DATE: INSTRUCTOR You have studied the method known as "completing the square" to solve quadratic equations. Another use for this method is in transforming the equation

More information

Exercise 1 Introduction to OpenGL

Exercise 1 Introduction to OpenGL Exercise 1 Introduction to OpenGL What we are going to do OpenGL Glut Small Example using OpenGl and Glut Alexandra Junghans 2 What is OpenGL? OpenGL Two Parts most widely used and supported graphics API

More information

[3] Rigid Body Analysis

[3] Rigid Body Analysis [3] Rigid Body Analysis Page 1 of 53 [3] Rigid Body Analysis [3.1] Equilibrium of a Rigid Body [3.2] Equations of Equilibrium [3.3] Equilibrium in 3-D [3.4] Simple Trusses [3.5] The Method of Joints [3.6]

More information

OCR Maths M2. Topic Questions from Papers. Projectiles

OCR Maths M2. Topic Questions from Papers. Projectiles OCR Maths M2 Topic Questions from Papers Projectiles PhysicsAndMathsTutor.com 21 Aparticleisprojectedhorizontallywithaspeedof6ms 1 from a point 10 m above horizontal ground. The particle moves freely under

More information

Visualized Problems in the Teaching Topic "Derivative of a Function"

Visualized Problems in the Teaching Topic Derivative of a Function Non-Standard Forms of Teaching Mathematics and Physics: Experimental and Modeling Approach IPA HU-SRB/1203/221/024 Visualized Problems in the Teaching Topic "Derivative of a Function" Valentina Kostić,

More information

How shapes are represented in 3D Graphics. Aims and objectives By the end of the lecture you will be able to describe

How shapes are represented in 3D Graphics. Aims and objectives By the end of the lecture you will be able to describe Today s lecture Today we will learn about The mathematics of 3D space vectors How shapes are represented in 3D Graphics Modelling shapes as polygons Aims and objectives By the end of the lecture you will

More information

Projectile Motion. A.1. Finding the flight time from the vertical motion. The five variables for the vertical motion are:

Projectile Motion. A.1. Finding the flight time from the vertical motion. The five variables for the vertical motion are: Projectile Motion A. Finding the muzzle speed v0 The speed of the projectile as it leaves the gun can be found by firing it horizontally from a table, and measuring the horizontal range R0. On the diagram,

More information

BLM Answers. BLM 4-1 Prerequisite Skills. BLM 4-3 Section 4.1 Modelling With Quadratic Relations. 10. a)

BLM Answers. BLM 4-1 Prerequisite Skills. BLM 4-3 Section 4.1 Modelling With Quadratic Relations. 10. a) BLM Answers (page 1) BLM 4-1 Prerequisite Skills 1. a) 11.1 2.7 9.0 d) 20.2 2. a) 1.7 10.7 6.5 d) 25.1 3. a) 9.5 20.7 96 d) 31.85 4. a) 3x 6x 2 + 6x + 5 10x 2 2x + 6 d) 12x 2 + 10x 6 5. a) 5 0 12 d) 2

More information

Quadratic Functions CHAPTER. 1.1 Lots and Projectiles Introduction to Quadratic Functions p. 31

Quadratic Functions CHAPTER. 1.1 Lots and Projectiles Introduction to Quadratic Functions p. 31 CHAPTER Quadratic Functions Arches are used to support the weight of walls and ceilings in buildings. Arches were first used in architecture by the Mesopotamians over 4000 years ago. Later, the Romans

More information

Andrew Yenalavitch Homework 1 CSE Fall 2014

Andrew Yenalavitch Homework 1 CSE Fall 2014 Andrew Yenalavitch Homework 1 CSE 420 - Fall 2014 1.) ( 20 points ) In the class, we have discussed how to draw a line given by y = m x + b using Besenham's algorithm with m 1. Extend the algorithm to

More information

Computer Graphics. Chapter 3 Computer Graphics Software

Computer Graphics. Chapter 3 Computer Graphics Software Computer Graphics Chapter 3 Computer Graphics Software Outline Graphics Software Packages Introduction to OpenGL Example Program 2 3 Graphics Software Software packages General Programming Graphics Packages

More information

Goals: - to be able to recognize the position-time, velocity-time and acceleration-time graphs of each of these main types of motion:

Goals: - to be able to recognize the position-time, velocity-time and acceleration-time graphs of each of these main types of motion: Unit: One-Dimensional Kinematics Level: 1 Prerequisites: None Points to: Goals: - to be able to recognize the position-time, velocity-time and acceleration-time graphs of each of these main types of motion:

More information

Preview. Two-Dimensional Motion and Vectors Section 1. Section 1 Introduction to Vectors. Section 2 Vector Operations. Section 3 Projectile Motion

Preview. Two-Dimensional Motion and Vectors Section 1. Section 1 Introduction to Vectors. Section 2 Vector Operations. Section 3 Projectile Motion Two-Dimensional Motion and Vectors Section 1 Preview Section 1 Introduction to Vectors Section 2 Vector Operations Section 3 Projectile Motion Section 4 Relative Motion Two-Dimensional Motion and Vectors

More information

? Which intermediate. Recall: Line drawing algorithm. Programmer specifies (x,y) of end pixels Need algorithm to determine pixels on line path

? Which intermediate. Recall: Line drawing algorithm. Programmer specifies (x,y) of end pixels Need algorithm to determine pixels on line path Recall: Line drawing algorithm Programmer specifies (x,y) of end pixels Need algorithm to determine pixels on line path 8 7 6 5 4 3 2 1 (3,2) (9,6) Line: (3,2) -> (9,6)? Which intermediate pixels to turn

More information

UNIT 4 GEOMETRIC OBJECTS AND TRANSFORMATIONS-1

UNIT 4 GEOMETRIC OBJECTS AND TRANSFORMATIONS-1 UNIT 4 GEOMETRIC OBJECTS AND TRANSFORMATIONS-1 1. Explain the complete procedure of converting a world object frame into camera or eye frame, using the model view matrix. (Jun2012) 10M Ans: World Space

More information

5.1. Examples: Going beyond Sequence

5.1. Examples: Going beyond Sequence Chapter 5. Selection In Chapter 1 we saw that algorithms deploy sequence, selection and repetition statements in combination to specify computations. Since that time, however, the computations that we

More information

Purpose of the experiment

Purpose of the experiment Projectile Motion PES 116 Advanced Physics Lab I Purpose of the experiment Measure the velocity of a ball using two photogates and Logger Pro. Apply the concepts of two-dimensional kinematics to predict

More information

Smoother Graphics Taking Control of Painting the Screen

Smoother Graphics Taking Control of Painting the Screen It is very likely that by now you ve tried something that made your game run rather slow. Perhaps you tried to use an image with a transparent background, or had a gazillion objects moving on the window

More information

Rendering. Part 1 An introduction to OpenGL

Rendering. Part 1 An introduction to OpenGL Rendering Part 1 An introduction to OpenGL Olivier Gourmel VORTEX Team IRIT University of Toulouse gourmel@irit.fr Image synthesis The Graphics Processing Unit (GPU): A highly parallel architecture specialized

More information

Physics 1050 Experiment 2. Acceleration Due to Gravity

Physics 1050 Experiment 2. Acceleration Due to Gravity Acceleration Due to Gravity Prelab uestions! These questions need to be completed before entering the lab. Show all workings. Prelab 1: For a falling ball which bounces, draw the expected shape of the

More information

Student Exploration: Quadratics in Polynomial Form

Student Exploration: Quadratics in Polynomial Form Name: Date: Student Exploration: Quadratics in Polynomial Form Vocabulary: axis of symmetry, parabola, quadratic function, vertex of a parabola Prior Knowledge Questions (Do these BEFORE using the Gizmo.)

More information

Slide 2 / 222. Algebra II. Quadratic Functions

Slide 2 / 222. Algebra II. Quadratic Functions Slide 1 / 222 Slide 2 / 222 Algebra II Quadratic Functions 2014-10-14 www.njctl.org Slide 3 / 222 Table of Contents Key Terms Explain Characteristics of Quadratic Functions Combining Transformations (review)

More information

Higher tier unit 6a check in test. Calculator

Higher tier unit 6a check in test. Calculator Higher tier unit 6a check in test Calculator Q1. The point A has coordinates (2, 3). The point B has coordinates (6, 8). M is the midpoint of the line AB. Find the coordinates of M. Q2. The points A, B

More information

Quadratics Functions: Review

Quadratics Functions: Review Quadratics Functions: Review Name Per Review outline Quadratic function general form: Quadratic function tables and graphs (parabolas) Important places on the parabola graph [see chart below] vertex (minimum

More information

ROSE-HULMAN INSTITUTE OF TECHNOLOGY

ROSE-HULMAN INSTITUTE OF TECHNOLOGY Introduction to Working Model Welcome to Working Model! What is Working Model? It's an advanced 2-dimensional motion simulation package with sophisticated editing capabilities. It allows you to build and

More information

Graphical Analysis of Kinematics

Graphical Analysis of Kinematics Physics Topics Graphical Analysis of Kinematics If necessary, review the following topics and relevant textbook sections from Serway / Jewett Physics for Scientists and Engineers, 9th Ed. Velocity and

More information

This library uses only GL functions but contains code for creating common objects and simplifying viewing.

This library uses only GL functions but contains code for creating common objects and simplifying viewing. PES Institute of Technology, Bangalore South Campus (Formerly PES School of Engineering) (Hosur Road, 1KM before Electronic City, Bangalore-560 100) INTERNAL TEST (SCHEME AND SOLUTION) 1 Subject Name:

More information

API for creating a display window and using keyboard/mouse interations. See RayWindow.cpp to see how these are used for Assignment3

API for creating a display window and using keyboard/mouse interations. See RayWindow.cpp to see how these are used for Assignment3 OpenGL Introduction Introduction OpenGL OpenGL is an API for computer graphics. Hardware-independent Windowing or getting input is not included in the API Low-level Only knows about triangles (kind of,

More information

Line Rasterization and Antialiasing

Line Rasterization and Antialiasing Katarina Mitchell, James Rich and Michael Bullis CprE 480x Final Project Line Rasterization and Antialiasing Rubric Code Modified and Added OpenGL Additions New types in SGP_config In utils/include/sgp.h

More information

Math 4: Advanced Algebra Ms. Sheppard-Brick A Quiz Review LT ,

Math 4: Advanced Algebra Ms. Sheppard-Brick A Quiz Review LT , 4A Quiz Review LT 3.4 3.10, 4.1 4.3 Key Facts Know how to use the formulas for projectile motion. The formulas will be given to you on the quiz, but you ll need to know what the variables stand for Horizontal:

More information

GEOMETRIC OBJECTS AND TRANSFORMATIONS I

GEOMETRIC OBJECTS AND TRANSFORMATIONS I Computer UNIT Graphics - 4 and Visualization 6 Hrs GEOMETRIC OBJECTS AND TRANSFORMATIONS I Scalars Points, and vectors Three-dimensional primitives Coordinate systems and frames Modelling a colored cube

More information

UNIT 3 Quadratic Relations JOURNAL

UNIT 3 Quadratic Relations JOURNAL 1 U n i t 10D Date: Name: UNIT Quadratic Relations JOURNAL Big idea/learning Goals Not everything in real life can be modeled by a linear relations which look like:. Non-linear relations can look like

More information

To Measure a Constant Velocity. Enter.

To Measure a Constant Velocity. Enter. To Measure a Constant Velocity Apparatus calculator, black lead, calculator based ranger (cbr, shown), Physics application this text, the use of the program becomes second nature. At the Vernier Software

More information

The Chase Problem (Part 1) David C. Arney

The Chase Problem (Part 1) David C. Arney The Chase Problem (Part 1) David C. Arney We build systems like the Wright brothers built airplanes build the whole thing, push it off a cliff, let it crash, and start all over again. --- R. M. Graham

More information

The parametric equation below represents a ball being thrown straight up. x(t) = 3 y(t) = 96t! 16t 2

The parametric equation below represents a ball being thrown straight up. x(t) = 3 y(t) = 96t! 16t 2 1 TASK 3.1.2: THROWING Solutions The parametric equation below represents a ball being thrown straight up. x(t) = 3 y(t) = 96t! 16t 2 1. What do you think the graph will look like? Make a sketch below.

More information

Graphics and Visualization

Graphics and Visualization International University Bremen Spring Semester 2006 Recap Display Devices First Lab Course OpenGL OpenGL is the premier environment for developing portable, interactive 2D and 3D graphics applications.

More information

MAC Learning Objectives. Module 4. Quadratic Functions and Equations. - Quadratic Functions - Solving Quadratic Equations

MAC Learning Objectives. Module 4. Quadratic Functions and Equations. - Quadratic Functions - Solving Quadratic Equations MAC 1105 Module 4 Quadratic Functions and Equations Learning Objectives Upon completing this module, you should be able to: 1. Understand basic concepts about quadratic functions and their graphs. 2. Complete

More information

mjb March 9, 2015 Chuck Evans

mjb March 9, 2015 Chuck Evans Vector Visualization What is a Vector Visualization Problem? A vector has direction and magnitude. Typically science and engineering problems that work this way are those involving fluid flow through a

More information

Line Drawing. Foundations of Computer Graphics Torsten Möller

Line Drawing. Foundations of Computer Graphics Torsten Möller Line Drawing Foundations of Computer Graphics Torsten Möller Rendering Pipeline Hardware Modelling Transform Visibility Illumination + Shading Perception, Interaction Color Texture/ Realism Reading Angel

More information

Module Contact: Dr R J Lapeer, CMP Copyright of the University of East Anglia Version 1

Module Contact: Dr R J Lapeer, CMP Copyright of the University of East Anglia Version 1 UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 2012-13 GRAPHICS 1 CMPC2G04 Time allowed: 2 hours Answer THREE questions out of FOUR. (40 marks each) Notes are not permitted

More information

Date Course Name Instructor Name Student(s) Name WHERE WILL IT LAND?

Date Course Name Instructor Name Student(s) Name WHERE WILL IT LAND? Date Course Name Instructor Name Student(s) Name WHERE WILL IT LAND? You have watched a ball roll off a table and strike the floor. What determines where it will land? Could you predict where it will land?

More information

Recall that creating or declaring a variable can be done as follows:

Recall that creating or declaring a variable can be done as follows: Lesson 2: & Conditionals Recall that creating or declaring a variable can be done as follows:! float radius = 20;! int counter = 5;! string name = Mr. Nickel ;! boolean ispressed = true;! char grade =

More information

Assignment 1. Simple Graphics program using OpenGL

Assignment 1. Simple Graphics program using OpenGL Assignment 1 Simple Graphics program using OpenGL In this assignment we will use basic OpenGL functions to draw some basic graphical figures. Example: Consider following program to draw a point on screen.

More information

How do you roll? Fig. 1 - Capstone screen showing graph areas and menus

How do you roll? Fig. 1 - Capstone screen showing graph areas and menus How do you roll? Purpose: Observe and compare the motion of a cart rolling down hill versus a cart rolling up hill. Develop a mathematical model of the position versus time and velocity versus time for

More information

But a vertex has two coordinates, an x and a y coordinate. So how would you find the corresponding y-value?

But a vertex has two coordinates, an x and a y coordinate. So how would you find the corresponding y-value? We will work with the vertex, orientation, and x- and y-intercepts of these functions. Intermediate algebra Class notes More Graphs of Quadratic Functions (section 11.6) In the previous section, we investigated

More information

CS559: Computer Graphics. Lecture 12: OpenGL Transformation Li Zhang Spring 2008

CS559: Computer Graphics. Lecture 12: OpenGL Transformation Li Zhang Spring 2008 CS559: Computer Graphics Lecture 2: OpenGL Transformation Li Zhang Spring 28 Today Transformation in OpenGL Reading Chapter 3 Last time Primitive Details glpolygonmode(glenum face, GLenum mode); face:

More information

void drawdot(glint x, GLint y) { glbegin(gl_points); glvertex2i(x,y); glend();

void drawdot(glint x, GLint y) { glbegin(gl_points); glvertex2i(x,y); glend(); CSC 706 Computer Graphics Primitives, Stippling, Fitting In OpenGL Primitives Examples: GL_POINTS GL_LINES GL_LINE_STRIP GL_POLYGON GL_LINE_LOOP GL_ TRIANGLES GL_QUAD_STRIP GL_TRIANGLE_STRIP GL_TRIANGLE_FAN

More information