Computational Geometry

Slides:



Advertisements
Similar presentations
Computational Geometry The systematic study of algorithms and data structures for geometric objects, with a focus on exact algorithms that are asymptotically.
Advertisements

ADA: 15. Basic Math1 Objective o a reminder about dot product and cross product, and their use for analyzing line segments (e.g. do two segments.
3D Graphics Rendering and Terrain Modeling
Convex Hull obstacle start end Convex Hull Convex Hull
CHAPTER 12 Height Maps, Hidden Surface Removal, Clipping and Level of Detail Algorithms © 2008 Cengage Learning EMEA.
Computational Geometry The systematic study of algorithms and data structures for geometric objects, with a focus on exact algorithms that are asymptotically.
5/17/2015 1:32 AMConvex Hull1 obstacle start end.

CS 450: Computer Graphics OVERVIEW OF POLYGONS
Computational Geometry & Collision detection
DESIGN OF A GENERIC PATH PATH PLANNING SYSTEM AILAB Path Planning Workgroup.
9/5/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Plane Sweep Algorithms and Segment Intersection Carola Wenk.
2. Voronoi Diagram 2.1 Definiton Given a finite set S of points in the plane , each point X of  defines a subset S X of S consisting of the points of.
CS 128/ES Lecture 12b1 Spatial Analysis (3D)
Chapter 11: Advanced Rendering Part 1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
CS 128/ES Lecture 12b1 Spatial Analysis (3D)
Ray Tracing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of.
Introduction to Computational Geometry Computational Geometry, WS 2007/08 Lecture 1 – Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut.
Lection 1: Introduction Computational Geometry Prof.Dr.Th.Ottmann 1 History: Proof-based, algorithmic, axiomatic geometry, computational geometry today.
UNC Chapel Hill M. C. Lin Overview of Last Lecture About Final Course Project –presentation, demo, write-up More geometric data structures –Binary Space.
Vectors.
Scalar and Vector Fields
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
Geometric Algorithms1 segment intersection orientation point inclusion simple closed path.
Projective geometry of 2-space DLT alg HZ 4.1 Rectification HZ 2.7 Hierarchy of maps Invariants HZ 2.4 Projective transform HZ 2.3 Behaviour at infinity.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Lecture 11 Stereo Reconstruction I Lecture 11 Stereo Reconstruction I Mata kuliah: T Computer Vision Tahun: 2010.
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
A Navigation Mesh for Dynamic Environments Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts CASA 2012.
Single View Geometry Course web page: vision.cis.udel.edu/cv April 7, 2003  Lecture 19.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
ADA: 14. Intro to CG1 Objective o give a non-technical overview of Computational geometry, concentrating on its main application areas Algorithm.
Computational Geometry The systematic study of algorithms and data structures for geometric objects, with a focus on exact algorithms that are asymptotically.
Autonomous Navigation for Flying Robots Lecture 2.2: 2D Geometry
Mathematics for Graphics. 1 Objectives Introduce the elements of geometry  Scalars  Vectors  Points Develop mathematical operations among them in a.
Linear Interpolation (for curve 01).  This chapter discusses straight lines and flat surfaces that are defined by points.  The application of these.
Background Mathematics Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006.
Section 3.2 Connections to Algebra.  In algebra, you learned a system of two linear equations in x and y can have exactly one solution, no solutions,
Introduction to Computer Graphics Geometric Transformations
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Computational Geometry The systematic study of algorithms and data structures for geometric objects, with a focus on exact algorithms that are asymptotically.
Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba.
Rendering Pipeline Fall, D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination.
homogeneous coordinates equationmisc point(w ; x, y, z)r w = S 0 where S 0 = xi + yj + zk  3 points in 3D space.
Computational Geometry 2012/10/23. Computational Geometry A branch of computer science that studies algorithms for solving geometric problems Applications:
Instructor: Mircea Nicolescu Lecture 5 CS 485 / 685 Computer Vision.
Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba.
Graphics Graphics Korea University kucg.korea.ac.kr Geometric Primitives 고려대학교 컴퓨터 그래픽스 연구실.
Autonomous Robots Robot Path Planning (2) © Manfred Huber 2008.
3D Rendering 2016, Fall.
Rendering Pipeline Fall, 2015.
3. Transformation
Lesson 3-6: Perpendicular & Distance
CMPS 3130/6130 Computational Geometry Spring 2017
Engineering Geometry Engineering geometry is the basic geometric elements and forms used in engineering design. Engineering and technical graphics are.
VECTORS APPLICATIONS NHAA/IMK/UNIMAP.
3D Graphics Rendering PPT By Ricardo Veguilla.
3D Clipping.
CS451Real-time Rendering Pipeline
Line and Character Attributes 2-D Transformation
© University of Wisconsin, CS559 Fall 2004
3D Rendering Pipeline Hidden Surface Removal 3D Primitives
WINDOWING AND CLIPPING
Convex Hull obstacle start end 11/21/2018 4:05 AM Convex Hull
2.2 Operations on Algebraic Vectors
Computational Geometry for the Tablet PC
WINDOWING AND CLIPPING
Spatial Databases: Digital Terrain Model
Convex Hull obstacle start end 4/30/2019 5:21 PM Convex Hull
Spatial Databases: Digital Terrain Model
Presentation transcript:

Computational Geometry The systematic study of algorithms and data structures for geometric objects, with a focus on exact algorithms that are asymptotically fast. Two key ingredients of a good algorithmic solution:  Thorough understanding of the problem geometry.  Proper application of algorithmic techniques and data structures.

Example 1  Proximity Closest café on campus? Voronoi diagram Delaunay triangulation Voronoi diagram

Example 2  Path Planning How can a robot find a short route to the destination that avoids all obstacles? Robot

Applications in Computer Graphics Creating scene images on a display device. Intersect geometric primitives (lines, polygons, polyhedra, etc.) Determine primitives lying in a region. Hidden surface removal – determine the visible part of a 3D scene while discard the occluded part from a view point. Create realistic-looking scenes – taking into account lighting and computing shadows. Deal with moving objects and detect collisions.

Applications in Robotics How the robot perceives, understands, and acts upon its environment: Motion planning. Grasping. Parts orienting. Optimal placement.

Applications in GIS Storage of geographical data (contours of countries, height of mountains, course of rivers, population, roads, electricity lines, etc.) Large amount of data – requiring efficient algorithms. Geographic data storage (e.g., map of roads for car positioning or computer display). Interpolation between nearby sample data points Overlay of multiple maps.

Applications in CAD/CAM Design of Products with a computer. Intersection, union, and decomposition of objects. Testing on product specifications. Testing design for feasibility. Design for assembly – modeling and simulation of assembly.

Line Segments & Vectors y 𝑝 1 = ( 𝑥 1 , 𝑦 1 ) 𝑝 1 − 𝑝 2 = ( 𝑥 1 − 𝑥 2 , 𝑦 1 − 𝑦 2 ) 𝑝 2 = ( 𝑥 2 , 𝑦 2 ) 𝑂 = (0, 0) x Points (vectors): 𝑝 1 , 𝑝 2 , 𝑝 1 − 𝑝 2 = 𝑝 2 𝑝 1 Line segment: 𝑝 2 𝑝 1 = 𝑝 1 𝑝 2

Dot (Inner) Product 𝑦 𝑝 2 𝜑 𝑝 1 (0, 0) 𝑥 𝑝 1 ∙ 𝑝 2 = 𝑥 1 𝑥 2 + 𝑦 1 𝑦 2 = 𝑝 2 ∙ 𝑝 1 = | 𝑝 1 𝑝 2 | cos 𝜑

Cross (Vector) Product 𝑦 𝑝 1 + 𝑝 2 𝑝 2 𝑝 1 × 𝑝 2 is the signed area of the parallelogram. 𝜑 𝑝 1 (0, 0) 𝑥 𝑝 1 × 𝑝 2 = 𝑥 1 𝑦 2 − 𝑥 2 𝑦 1 =− 𝑝 2 × 𝑝 1 = | 𝑝 1 𝑝 2 | sin 𝜑 𝑝 1 and 𝑝 2 are collinear with the origin iff 𝑝 1 × 𝑝 2 = 0.

Turning of Consecutive Segments Segments 𝑝 0 𝑝 1 and 𝑝 1 𝑝 2 . Move from 𝑝 0 to 𝑝 1 then to 𝑝 2 . 𝑝 2 𝑝 1 𝑝 0 𝑝 0 𝑝 2 𝑝 1 𝑝 1 𝑝 2 𝑝 0 Counterclockwise Clockwise Turn of 0 or 𝜋 𝑝 0 𝑝 1 × 𝑝 1 𝑝 2 >0 𝑝 0 𝑝 1 × 𝑝 1 𝑝 2 < 0 𝑝 0 𝑝 1 × 𝑝 1 𝑝 2 = 0

Case of Collinearity 𝑝 0 𝑝 1 × 𝑝 1 𝑝 2 = 0 𝑝 0 𝑝 1 × 𝑝 1 𝑝 2 = 0 𝑝 1 , 𝑝 2 , 𝑝 3 are collinear. 𝑝 1 𝑝 2 𝑝 0 𝑝 2 𝑝 1 𝑝 0 No change of direction Direction reversal 𝑝 0 𝑝 1 ∙ 𝑝 1 𝑝 2 >0 𝑝 0 𝑝 1 ∙ 𝑝 1 𝑝 2 < 0

Intersection of Two Lines 𝑙 1 : 𝑎 1 𝑥+ 𝑏 1 𝑦+ 𝑐 1 =0 𝑙 1 𝑙 2 : 𝑎 2 𝑥+ 𝑏 2 𝑦+ 𝑐 2 =0 𝑝 Rewrite the above equations as dot products: ( 𝑎 1 , 𝑏 1 , 𝑐 1 ) ∙ (𝑥,𝑦,1) =0 𝑙 2 ( 𝑎 2 , 𝑏 2 , 𝑐 2 ) ∙ (𝑥,𝑦,1) =0 Hence (𝑥,𝑦, 1) is perpendicular to both ( 𝑎 1 , 𝑏 1 , 𝑐 1 ) and ( 𝑎 2 , 𝑏 2 , 𝑐 2 ). . (𝑥,𝑦, 1) must be parallel to their cross product!

Homogeneous Coordinates Represent every point (𝑥, 𝑦) as 𝑥, 𝑦, 1 . homogeneous coordinates of (𝑥, 𝑦) Intersection (𝑥, 𝑦, 1) is parallel to the cross product vector: 𝑎 1 , 𝑏 1 , 𝑐 1 × 𝑎 2 , 𝑏 2 , 𝑐 2 =( 𝑏 1 𝑐 2 − 𝑏 2 𝑐 1 , 𝑐 1 𝑎 2 − 𝑐 2 𝑎 1 , 𝑎 1 𝑏 2 − 𝑎 2 𝑏 1 ) homogeneous coordinates of intersection Normalize the 𝑧-coordinate of the cross product to 1. 𝑏 1 𝑐 2 − 𝑏 2 𝑐 1 𝑎 1 𝑏 2 − 𝑎 2 𝑏 1 , 𝑐 1 𝑎 2 − 𝑐 2 𝑎 1 𝑎 1 𝑏 2 − 𝑎 2 𝑏 1 ,1 Hence the intersection point: 𝑏 1 𝑐 2 − 𝑏 2 𝑐 1 𝑎 1 𝑏 2 − 𝑎 2 𝑏 1 , 𝑐 1 𝑎 2 − 𝑐 2 𝑎 1 𝑎 1 𝑏 2 − 𝑎 2 𝑏 1

Intersection Example Find the intersect point of the lines: Take the cross product of the two coefficient vectors: Intersection point:

Two Parallel Lines 𝑎 1 𝑏 2 − 𝑏 1 𝑎 2 =0 𝑙 1 : 𝑎 1 𝑥+ 𝑏 1 𝑦+ 𝑐 1 =0 𝑙 1 : 𝑎 1 𝑥+ 𝑏 1 𝑦+ 𝑐 1 =0 𝑙 2 : 𝑎 2 𝑥+ 𝑏 2 𝑦+ 𝑐 2 =0 𝑎 1 𝑏 2 − 𝑏 1 𝑎 2 =0 𝑎 1 , 𝑏 1 , 𝑐 1 × 𝑎 2 , 𝑏 2 , 𝑐 2 =( 𝑏 1 𝑐 2 − 𝑏 2 𝑐 1 , 𝑐 1 𝑎 2 − 𝑐 2 𝑎 1 , 𝑎 1 𝑏 2 − 𝑎 2 𝑏 1 ) =( 𝑏 1 𝑐 2 − 𝑏 2 𝑐 1 , 𝑐 1 𝑎 2 − 𝑐 2 𝑎 1 ,𝟎) point at infinity Two parallel lines “intersect” at infinity.

Line through Two Points 𝑎𝑥+𝑏𝑦+𝑐=0? 𝑎 𝑥 1 +𝑏 𝑦 1 +𝑐=0 𝑎 𝑥 2 +𝑏 𝑦 2 +𝑐=0 ( 𝑥 1 , 𝑦 1 ) ( 𝑥 2 , 𝑦 2 ) 𝑎, 𝑏, 𝑐 ∙ 𝑥 1 , 𝑦 1 ,1 =0 𝑎, 𝑏, 𝑐 ∙ 𝑥 2 , 𝑦 2 ,1 =0 𝑎, 𝑏, 𝑐 = 𝑥 1 , 𝑦 1 ,1 × 𝑥 2 , 𝑦 2 ,1 Scaling yields the same line! Ex. The line through (3, 1) and (-4, 5) has coefficients (i.e., homogeneous coordinates) and equation

Advantages of Homogeneous Coordinates Scaling independent: all represent the same point Uniform handling of all cases (horizontal, perpendicular, parallel lines, etc.) No need to solve equations – just take a cross product. For more, see http://web.cs.iastate.edu/~cs577/handouts/homogeneous-coords.pdf

Lines in the Space Use Plucker coordinates: (𝑙, 𝑝×𝑙) 𝑙 𝑝 𝑂 Compute the distance between two lines. 𝑝 Find their common perpendicular. Find intersections with their common perpendicular. 𝑂 (When the lines intersect, the two intersections coincide.) For more, see http://web.cs.iastate.edu/~cs577/handouts/plucker-coordinates.pdf