Multitouch and Collision Detection MOBILE SOFTWARE DEVELOPMENT.

Slides:



Advertisements
Similar presentations
Objective - To graph linear equations using the slope and y-intercept.
Advertisements

Parallel Lines & Transversals
SLOPE.
Computer Graphics CLIPPING.
Objectives Define Clipping Various clipping methods. Line clipping methods.
Line clipping: Line clipping algorithm is method of eliminate lines of outside area of the object,so outside of object viewing is Removed. Typically, any.
7-4 Evaluating and Graphing Sine and Cosine Objective: To use reference angles, calculators or tables, and special angles to find values of the sine and.
Course Website: Computer Graphics 4: Viewing In 2D.
2D Viewing and Projection
COMPUTER GRAPHICS CS 482 – FALL 2014 OCTOBER 13, 2014 IMPLICIT REPRESENTATIONS IMPLICIT FUNCTIONS IMPLICIT SURFACES MARCHING CUBES.
Algorithms and Data Structures Lecture 13. Agenda: Plane Geometry: algorithms on polygons - Verification if point belongs to a polygon - Convex hull.
Math: Geometry & Trigonometry
The Unit Circle.
Video Object Tracking and Replacement for Post TV Production LYU0303 Final Year Project Fall 2003.
CS 376 Introduction to Computer Graphics 02 / 26 / 2007 Instructor: Michael Eckmann.
Sullivan Algebra & Trigonometry: Section 3.2 The Graph of a Function Objectives Identify the Graph of a Function Obtain Information from or about the Graph.
Perpendicular Lines Topic
Geometric Algorithms1 segment intersection orientation point inclusion simple closed path.
3.2 Graphing Functions and Relations
Computational Geometry Convex Hulls Robust Geometric Primitives Degeneracy and Stability Nick Pilkington.
CS 325 Introduction to Computer Graphics 03 / 03 / 2010 Instructor: Michael Eckmann.
Basics of Rendering Pipeline Based Rendering –Objects in the scene are rendered in a sequence of steps that form the Rendering Pipeline. Ray-Tracing –A.
October 14, 2014Computer Vision Lecture 11: Image Segmentation I 1Contours How should we represent contours? A good contour representation should meet.
Clipping: Clipping is a process of dividing an object into visible and invisible positions and displaying the visible portion and discarding the invisible.
CS 325 Introduction to Computer Graphics 03 / 08 / 2010 Instructor: Michael Eckmann.
Collision handling: detection and response
Part 6: Graphics Output Primitives (4) 1.  Another useful construct,besides points, straight line segments, and curves for describing components of a.
Computer Graphics World, View and Projection Matrices CO2409 Computer Graphics Week 8.
Chapter 6: Linear Function Group Member: Angela, Vincent, Krystal, Antony.
Algebra 3 Section 2.3 The Graph of a Function Objectives Identify the Graph of a Function Identify the Graph of a Function Obtain Information from or about.
Class 5: Question 1 Which of the following systems of equations can be represented by the graph below?
Introduction to Computational Geometry Hackson
Notes Over 8.4 Rewriting Logarithmic Equations Rewrite the equation in exponential form.
Section Recall Then you applied these to several oblique triangles and developed the law of sines and the law of cosines.
LINEAR SYSTEMS – Graphing Method In this module, we will be graphing two linear equations on one coordinate plane and seeing where they intersect. You.
Math on the Mind Model y = –2x + 4 with a table of values and a graph.
Section 3.5 Piecewise Functions Day 2 Standard: MM2A1 ab Essential Question: How do I graph piecewise functions and given a graph, can I write the rule?
GRAPHING SYSTEMS OF EQUATIONS Algebra 1: Unit 7. GRAPHING LINEAR EQUATIONS.
Fundamental Data Structures and Algorithms Klaus Sutner April 27, 2004 Computational Geometry.
Practice 1.) Solve for y : 4x + 2y = -8 2.) Solve for y: 3x – 5y = 10 3.) Graph the equation: 3x – 2y = 5 x y O
L4-Vector Algorithms L4 – Vector Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems Abdulghani Hasan.
12/20/2015 Math 2 Honors - Santowski 1 Lesson 53 – Solving Trigonometric Equations Math 2 Honors - Santowski.
12/23/ : Slopes of Lines 1 Expectation: You will calculate slopes of lines parallel and perpendicular to given lines.
February 6, 2012 At the end of today, you will be able to understand inverse trig functions. Warm-up: Trig Review without a calculator
Areas Between Curves In this section we are going to look at finding the area between two curves. There are actually two cases that we are going to be.
Sullivan Algebra and Trigonometry: Section 2.4 Objectives Define Parallel and Perpendicular Lines Find Equations of Parallel Lines Find Equations of Perpendicular.
Warm Up Solve each equation for y. 1.x = -4y 2.x = 2y x = (y + 3)/3 4.x = -1/3 (y + 1)
Angles continued Interior Angles are those angles inside the parallel lines. Exterior Angles are those angles outside the parallel lines.
Meet the Parents Interception Who’s Line is It anyway?
Archimedes Limits by Archimedes of Syracuse. There is a fascinating history about how they made an attempt to calculate the area of a circle.
Direct and inverse variation
Library of Functions COLLEGE ALGEBRA.
5-1 Graphing Systems of Equations
Computer Graphics CC416 Week 13 Clipping.
Collision Detection Box-to-Box.
Basic Math Skills.
WINDOWING AND CLIPPING
Systems of Equations Solving by Graphing.
Parallel Lines cut by a Transversal
WINDOWING AND CLIPPING
Solve Systems of Equations
9.3 Graph and Write Equations of Circles
SYMMETRY Even and Odd Suppose f is continuous on [-a, a] and even
5.1 Solving Systems of Equations by Graphing
Warm Up #.
Example 5A: Solving Simple Rational Equations
please quietly copy onto your class notebook
Use Graphs of Functions
Polygons.
Solving Linear Systems by Graphing
Presentation transcript:

Multitouch and Collision Detection MOBILE SOFTWARE DEVELOPMENT

2 Contents  Multipoint Rotations  Point in Polygon  Algorithm  Readings

3 Multipoint Rotation  Simple Idea: easy to get 1 or more points from touch screen  Get points  Calculate angle between points  Rotate object / shape based on calculated angle  Rotate actual points instead of bitmap  Linear equations: slope, + little bit of trigonometry

4 Multipoint Rotation  Recall slope m of a graph is  Recall  Use arctan (inverse tan) to determine angle theta  Rotate object by that angle

5 Point in Polygon  Want to determine whether x,y point is inside a closed polygon

6 Point in Polygon  Can use ray casting algorithm – go right or left OR bottom to top  If odd number of intersections then point is inside  If even number of intersections then point is outside

7 Point in Polygon  Also works for complicated cases  Can be minor precision issues with floating point numbers  Need to use Maths to calculate  Polygon must be closed

8 Algorithm  Consider polygon segment by segment  Use linear equations  Origin point (0,0) starts at the top left corner of screen  Find out if point is on the inside of the polygon  Does line segment intersect ray cast from point?  Do this for all polygon segments

9 Point must be in range  x 1, y 1 - x 2, y 2

10 Point must be in range  x 1, y 1 - x 2, y 2

11 Does line segment intersect ray?  See lecture notes below if you want to understand maths behind it 

12 Resources  Point in Polygon    tric.pdf tric.pdf