2003CS Hons RW778 Graphics1 Chapter 4: Vector Tools 4.5 Representation of Key Geometric Objects 4.5 Representation of Key Geometric Objects –4.5.1 Coordinate.

Slides:



Advertisements
Similar presentations
2.5. B ASIC P RIMITIVE I NTERSECTION Details of common forms of primitive intersection test.
Advertisements

Vector Calculus Mengxia Zhu Fall Objective Review vector arithmetic Distinguish points and vectors Relate geometric concepts to their algebraic.
Intersection Testing Chapter 13 Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Geometry Primer Lines and rays Planes Spheres Frustums Triangles Polygon Polyhedron.
10/10/02 (c) 2002 University of Wisconsin, CS 559 Last Time Finished viewing: Now you know how to: –Define a region of space that you wish to view – the.
CHAPTER 12 Height Maps, Hidden Surface Removal, Clipping and Level of Detail Algorithms © 2008 Cengage Learning EMEA.
David Breen, William Regli and Maxim Peysakhov
Two-Dimensional Viewing Jehee Lee Seoul National University.
CMPE 466 COMPUTER GRAPHICS Chapter 8 2D Viewing Instructor: D. Arifler Material based on - Computer Graphics with OpenGL ®, Fourth Edition by Donald Hearn,
Ray Polygon Interception: Cyrus Beck Algorithm Mengxia Zhu Fall 2007.
Chi-Cheng Lin, Winona State University CS430 Computer Graphics Vectors Part IV Polygon Intersection.
© University of Wisconsin, CS559 Spring 2004
1 Curves and Surfaces. 2 Representation of Curves & Surfaces Polygon Meshes Parametric Cubic Curves Parametric Bi-Cubic Surfaces Quadric Surfaces Specialized.
Chapter 12 – Vectors and the Geometry of Space
Graphics Graphics Korea University cgvr.korea.ac.kr 3D Object Representation 고려대학교 컴퓨터 그래픽스 연구실.
Computer Graphics using OpenGL, 3 rd Edition F. S. Hill, Jr. and S. Kelley Chapter Vector Tools for Graphics S. M. Lea University of North Carolina.
Informationsteknologi Thursday, November 22, 2007Computer Graphics - Class 111 Today’s class Clipping Parametric and point-normal form of lines Intersecting.
Vertices and Fragments I CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Computer Graphics - Class 14
University of North Carolina at Greensboro
Geometric Modeling Surfaces Mortenson Chapter 6 and Angel Chapter 9.
Curves Mortenson Chapter 2-5 and Angel Chapter 9
ENDS 375 Foundations of Visualization Geometric Representation 9/30/04.
ENDS 375 Foundations of Visualization Geometric Representation 10/5/04.
CSE 681 Object Intersection. CSE 681 Object Representation Implicit forms F(x,y,z) = 0 Explicit forms Analytic form x = F(y,z) testing generating Parametric.
Vectors.
Geometric Objects and Transformations Geometric Entities Representation vs. Reference System Geometric ADT (Abstract Data Types)
Week 13 - Wednesday CS361.
Vector Exercise. Parametric form for a line Passing two points.
Mathematical fundamentals of 3D computer graphics 1.1 Manipulating three-dimensional structures 1.2 Vectors and computer graphics 1.3 Rays and computer.
Clipping Apart from clipping to the view volume, clipping is a basic operation in many other algorithms –Breaking space up into chunks –2D drawing and.
2003CS Hons RW778 Graphics1 Chapter 6: Polygonal Meshes 6.2 Introduction 6.2 Introduction –Polygonal mesh: collection of polygons (faces) –List of polygons,
A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Spline curves 1/23 Curves and Surfaces.
Two-Dimensional Viewing
2003CS Hons RW778 Graphics1 Chapter 3: Windows, viewports World coordinates rather than screen coordinates. World coordinates rather than screen coordinates.
1 Ray Tracing Polyhedra ©Anthony Steed
2003CS Hons RW778 Graphics1 Chapter 5: Transforming Objects 5.2 Introduction to Transformations 5.2 Introduction to Transformations –Affine transformations.
CS 480/680 Computer Graphics Shading in OpenGL Dr. Frederick C Harris, Jr. Fall 2013.
1 CS 430/536 Computer Graphics I Polygon Clipping and Filling Week 3, Lecture 5 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent.
1 CS 430/536 Computer Graphics I Curve Drawing Algorithms Week 4, Lecture 8 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent Computing.
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
Chi-Cheng Lin, Winona State University CS430 Computer Graphics Vectors Part II Application of Linear Combination.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
12.1 – Explore Solids.
Background Mathematics Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006.
1 Visiblity: Culling and Clipping Computer Graphics COMP 770 (236) Spring 2009 January 21 & 26: 2009.
12.1 & 12.2 – Explore Solids & Surface Area of Prisms and Cones.
1 Dr. Scott Schaefer Intersecting Simple Surfaces.
Vector Tools for Computer Graphics
2003CS Hons RW778 Graphics1 Chapter 7: Three-Dimensional Viewing Chapter 5: Camera with parallel projection Chapter 5: Camera with parallel projection.
10/19/04© University of Wisconsin, CS559 Fall 2004 Last Time Clipping –Why we care –Sutherland-Hodgman –Cohen-Sutherland –Intuition for Liang-Barsky Homework.
Coordinate Systems and Coordinate Frames  vector v = (3, 2, 7)  point P = (5, 3, 1)  coordinate frame consists of a specific point, V, called the origin,
1 11. Polygons Polygons 2D polygons ( 다각형 ) –Polygon sides are all straight lines lying in the same plane 3D polyhedra ( 다면체 )  chap. 12 –Polyhedra.
CSC418 Computer Graphics n Polygons –Triangulation –Scan conversion –Convex/Concave – clipping) n 2D affine transformations and properties, Homogeneous.
Chapter III Rasterization
Parametric Curves CS 318 Interactive Computer Graphics John C. Hart.
Chi-Cheng Lin, Winona State University CS430 Computer Graphics Vectors Part III Intersections.
Introduction to Computer Graphics Chapter 6 – 2D Viewing Pt 3 1.
Clipping Primitives. Clipping line Clipping rectangle: – x min to x max – y min to y max A point (x,y) lies within a clip rectangle and thus displayed.
CS552: Computer Graphics Lecture 19: Bezier Curves.
CSE 681 Object Intersection. CSE 681 Object Representation Implicit forms F(x,y,z) = 0 Explicit forms Analytic form x = F(y,z) testing generating Parametric.
University of North Carolina at Greensboro
University of North Carolina at Greensboro
© University of Wisconsin, CS559 Spring 2004
© University of Wisconsin, CS559 Fall 2004
Object Intersection CSE 681.
Object Intersection CSE 681.
Ray Tracing Polyhedra ©Anthony Steed
Chapter 9 Lesson 3 Pg. 699 Solving Systems of Equations by Graphing
Chapter 9 Lesson 3 Pg. 699 Solving Systems of Equations by Graphing
Presentation transcript:

2003CS Hons RW778 Graphics1 Chapter 4: Vector Tools 4.5 Representation of Key Geometric Objects 4.5 Representation of Key Geometric Objects –4.5.1 Coordinate Systems and Coordinate Frames »Points: location, no size, no direction »Vectors: size, direction, no location »A coordinate system is located in a world. »Coordinate frame: specific origin, and 3 unit vectors a,b,c.

2003CS Hons RW778 Graphics2 Chapter 4: Vector Tools »v = v 1 a + v 2 b + v 3 c »P = + p 1 a + p 2 b + p 3 c –Homogeneous Representation of Point, Vector »v = (a,b,c, ) »P = (a,b,c, ) »Note: OpenGL uses 4D homogeneous coordinates by default.

2003CS Hons RW778 Graphics3 Chapter 4: Vector Tools –Linear combination of vectors: Valid. –Linear combination of points: Only affine valid. –4.5.2 Affine combinations of points, examples and practice exercises: Selfstudy. –4.5.3 Linear Interpolation of Two Points »P = A(1-t) + Bt –4.5.4 Tweening for art and animation »P i = A i (1-t) + B i t »Extrapolation, key frames –4.5.5 Quadratic and cubic tweening, Bezier curves »Selfstudy.

2003CS Hons RW778 Graphics4 Chapter 4: Vector Tools Representing Lines and Planes Representing Lines and Planes –Line, line segment, ray –Parametric representation of line: L(t) = C + bt –Point normal form for line (implicit) »Given line L through C and B, what is point normal form? »(B-C) . (R-C) = 0 where R any point on line. –Moving from one representation to another: Selfstudy.

2003CS Hons RW778 Graphics5 Chapter 4: Vector Tools Planes in 3D Space Planes in 3D Space –Parametric Representation of a Plane »P(s,t) = C + as + bt or »P(s,t) = sA + tB + (1-s-t)C –Point normal form for Plane : Selfstudy up to p. 180.

2003CS Hons RW778 Graphics6 Chapter 4: Vector Tools Planar Patches Planar Patches

2003CS Hons RW778 Graphics7 Chapter 4: Vector Tools 4.6 Finding the Intersection of 2 Line Segments 4.6 Finding the Intersection of 2 Line Segments –Parametric representations: A + bt = C + du, or bt = c + du, or d . bt = d . c

2003CS Hons RW778 Graphics8 Chapter 4: Vector Tools –Case 1: d . b not zero »t = (d . c)/(d . b) »u = (b . c)/(d . b) CHECK ERRATA this wrong »Intersection point I = A + ((d . c)/(d . b))b if 0 < t,u < 1 –Case 2: d . b zero : Lines are parallel Application of Line Intersections: Circle through 3 points : Selfstudy Application of Line Intersections: Circle through 3 points : Selfstudy.

2003CS Hons RW778 Graphics9 Chapter 4: Vector Tools 4.7 Intersections of Lines with Planes; Clipping 4.7 Intersections of Lines with Planes; Clipping –Line parametric representation; plane point normal form. –t hit = (n. (B-A))/(n. c) –Hit point P hit = A + ct hit

2003CS Hons RW778 Graphics10 Chapter 4: Vector Tools –If n. c > 0 : ray aimed along with normal –If n. c < 0 : ray aimed counter to normal –If n. c = 0 : ray parallel to line 4.8 Polygon Intersection Problems 4.8 Polygon Intersection Problems

2003CS Hons RW778 Graphics11 Chapter 4: Vector Tools –Is given point P inside or outside the object? –Where does a given ray R first intersect the object? –Which part of given line L lies inside object, and which part outside? Convex Polygons and Polyhedra Convex Polygons and Polyhedra –Convex polygon described by bounding lines –Convex polyhedron described by bounding planes

2003CS Hons RW778 Graphics12 Chapter 4: Vector Tools –Inside halfspace contains all points of polygon; outside halfspace shares no points with polygon Ray Intersection, Clipping for Convex Polygons Ray Intersection, Clipping for Convex Polygons –The Intersection problem: Use ray/line intersection solution, and calculate »Entering hit point A+ ct in and »Exiting hit point A + ct out »Ray inside polygon for [t in,t out ]

2003CS Hons RW778 Graphics13 Chapter 4: Vector Tools –The Clipping problem: »A’ = A + c max(0,t in ) »C’ = A + c min(t out,1) »To find t in, t out, consider each bounding line of P and calculate intersection with A+ct. Note: Bounding lines stored in point normal form Note: Bounding lines stored in point normal form Note: n is outward-pointing normal. Note: n is outward-pointing normal. 1.Init candidate interval to [0,1] 2.For each bounding line, find hit time and establish whether entering or exiting ray using n. c. » If entering, set t in = max (t in, t hit ). » If exiting, set t out = min(t out,t hit ). 3.Segment from A+ct in to A+ct out lies inside P.

2003CS Hons RW778 Graphics14 Chapter 4: Vector Tools Example p. 192: Selfstudy. Example p. 192: Selfstudy. Cyrus-Beck clipping: Selfstudy. Cyrus-Beck clipping: Selfstudy Clipping against arbitrary polygons Clipping against arbitrary polygons –As before, but lists of segments Advanced clipping Advanced clipping –Sutherland-Hodgman »Similar to Cyrus-Beck, but clips entire polygon (not just line segment) against convex polygon. Output polygon. –Weiler-Atherton »Clips any polygon against any other polygon

2003CS Hons RW778 Graphics15 Chapter 4: Vector tools Programming Task 3 : Implement Case Study 4.1 (Animation with tweening), p. 198, in Hill. Programming Task 3 : Implement Case Study 4.1 (Animation with tweening), p. 198, in Hill.