Animation Pages 133-141.

Slides:



Advertisements
Similar presentations
Pass by Value. COMP104 Pass by Value / Slide 2 Passing Parameters by Value * A function returns a single result (assuming the function is not a void function)
Advertisements

This terms course Last term we both worked on learning 2 things –Processing –The concepts of graphics etc. This term will focus more on the basic concepts.
Emerging Platform#5: Processing 2 B. Ramamurthy 6/13/2014B. Ramamurthy, CS6511.
In our lesson today we will learn how to find the area of a building.
PASSING PARAMETERS 1. 2 Parameter Passing (by Value) Parameters Formal Parameters – parameters listed in the header of the function Variables used within.
Translate, Rotate, Matrix Pages Function Function Definition Calling a function Parameters Return type and return statement.
2.1 Quadratic Functions Completing the square Write Quadratic in Vertex form.
OBJECTIVES 2.6 Introduction to Algebra and Expressions Slide 1Copyright 2012, 2008, 2004, 2000 Pearson Education, Inc. aEvaluate an algebraic expression.
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
4.2 Adding and Subtracting Matrices 4.3 Matrix Multiplication
Properties A property is something that is true for all situations.
Taks Objective 2 Properties and attributes of function.
1. Copyright © 2006 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Systems of Equations CHAPTER 1Solving Systems of Linear Equations Graphically.
Chapter 2 Equations, Inequalities and Problem Solving.
Variables and Arithmetic. From last class More drawing functions: strokeWeight(n); // higher the n value broader the stroke fill(k) ; // single parameter.
1.4 Solving Equations ●A variable is a letter which represents an unknown number. Any letter can be used as a variable. ●An algebraic expression contains.
Activity 2.1 Spending and Earning Money. In your groups read page 181 and complete questions 1, 2 and 3 Definition –A sum function is when you add two.
Rules for Means and Variances. Rules for Means: Rule 1: If X is a random variable and a and b are constants, then If we add a constant a to every value.
Write the following statement as a mathematical expression using parenthesis and brackets and then evaluate. 51. Multiply 5 by 3.From this product.
Solving Systems Using Elimination
B. RAMAMURTHY Simulating Motion and Implementing Animation.
Lesson 4-2 Operations on Functions. We can do some basic operations on functions.
XNA Basic Displaying Image & Collision Detect. What’s format image that XNA support? XNA support only.bmp.png and.jpg image..PNG have transparent region.
Animation Pages Function Function Definition Calling a function Parameters Return type and return statement.
3.1 Systems of Linear Equations (Elimination – or as the book calls it, Addition Method)
One step equations Add Subtract Multiply Divide  When we solve an equation, our goal is to isolate our variable by using our inverse operations.  What.
The properties of real numbers help us simplify math expressions and help us better understand the concepts of algebra.
 In this lesson we will go over how to solve a basic matrix equation such as the following: These are matrices, not variables.
EXAMPLE 1 Add and subtract matrices
Creating and Using Class Methods. Definition Class Object.
Polynomials Objective: To review operations involving polynomials.
2.2 Solving Two- Step Equations. Solving Two Steps Equations 1. Use the Addition or Subtraction Property of Equality to get the term with a variable on.
Simplifying Radical Expressions Objective: Add, subtract, multiply, divide, and simplify radical expressions.
Int fact (int n) { If (n == 0) return 1; else return n * fact (n – 1); } 5 void main () { Int Sum; : Sum = fact (5); : } Factorial Program Using Recursion.
3.5 Perform Basic Matrix Operations Add Matrices Subtract Matrices Solve Matric equations for x and y.
Solving 2 step equations. Two step equations have addition or subtraction and multiply or divide 3x + 1 = 10 3x + 1 = 10 4y + 2 = 10 4y + 2 = 10 2b +
Solving Systems of Equations Using the Elimination Method.
Graphing Rational Functions Day 2
12-1 Organizing Data Using Matrices
Expanding Algebraic Expressions
Emerging Platform#1: Processing 3
THE DISTRIBUTIVE PROPERTY
Variables and Expressions
FIGURE 4-10 Function Return Statements
Although winning the Texas Lottery Jackpot is a very unlikely event, there are still other prizes you can win. What is the Expected winnings on a $1 bet?
Chapter 3 Kinetics in Two or Three Dimensions, Vectors (1 week)
Knowing your math operation terms
Introduction to Variables, Algebraic Expressions, and Equations
2.4 – Linear inequalities and problem solving
Partial Products Algorithm for Multiplication
Lesson Objectives: I will be able to …
Transformations 6 University of British Columbia
Perform Function Operations and Composition
Systems of Equations and Inequalities
Transformations 4 University of British Columbia
To get y, multiply x by 3 then add 2 To get y, multiply x by negative ½ then add 2 To get y, multiply x by 2 then subtract 3 To get y, multiply x.
Faculty of Computer Science & Information System
Subtracting Like and Unlike Fractions
Warm-Up Add or subtract. 1) (5x2 + 4x + 2) + (-2x + 7 – 3x2)
Objective - To add and subtract decimals.
Warm Up Combine like terms: 6x – 2xy – 7z + 4 – 3y + x – 7xy + 3y xz.
Subtracting Like and Unlike Fractions
Combining Like terms.
Solving Systems of Equations by Elimination
Translate, Rotate, Matrix
Replacing f(x) with f(x)+k and f(x+k) (2.6.1)
1.5 Combination of Functions
Decode the message: (1, -5) (-5, -3) (5, -5) (-2, -3) (4, 5) (1, 3) (4, 5) (1, -3) (-4, 4) (3, 2) (-5, -3) (5,-5) Write your own message!
Matrix Multiplication Sec. 4.2
Presentation transcript:

Animation Pages 133-141

Function Function Definition Calling a function Parameters Return type and return statement

Function: Intuitive Understanding Function F F(x) X

Examples Add 10 20 10 X=10, y=4 Multiply (x,y) 40 Subtract 6 4

Function concept int z = add(34, 10); // function call Function definition: int add (int x , int y) // x,y formal parameters { int sum;// sum is a local variable sum = x + y; return sum; } add 34 10 X Y sum

translate Translate function moves the origin by the amount specified int x,y; x = 10; y = 10; void draw() { background(30,50,60); translate(x,y); rect(x,y,70,30); x++; if (x> width) x = 0; y++; if (y>height) y = 0; }

Multiple objects Consider a scenario with multiple objects Each with its own initial position Size Speed How will you define these? How will control these? How will you detect collisions among these and take action?

Matrices (or layers) In order to represent independent motion and axes and other attributes, Processing provides pushMatrix() and popMatrix() These create new layers of axes for objects to exist and be controlled independently. Lets look at some examples.