3D Geometry for Computer Graphics Class 1. General Office hour: Sunday 11:00 – 12:00 in Schreiber 002 (contact in advance) Webpage with the slides:

Slides:



Advertisements
Similar presentations
Computer Graphics - Geometry & Representation -
Advertisements

Vectors Part Trois.
Vector Calculus Mengxia Zhu Fall Objective Review vector arithmetic Distinguish points and vectors Relate geometric concepts to their algebraic.
Demetriou/Loizidou – ACSC330 – Chapter 4 Geometric Objects and Transformations Dr. Giorgos A. Demetriou Dr. Stephania Loizidou Himona Computer Science.
11 Analytic Geometry in Three Dimensions
UBI 516 Advanced Computer Graphics

Even More Vectors.
MA Day 9 – January 17, 2013 Review: Equations of lines, Section 9.5 Section 9.5 –Planes.
GEOMETRY Chapter 3: Angle Pairs, Lines and Planes
Graphics Graphics Korea University cgvr.korea.ac.kr 3D Object Representation 고려대학교 컴퓨터 그래픽스 연구실.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Geometry Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and.
Computer Graphics Recitation 1. General Office hour: Sunday 16:00 – 17:00 in Schreiber 002 Webpage with the slides:
Basic Math Vectors and Scalars Addition/Subtraction of Vectors Unit Vectors Dot Product.
Transformations. 2 Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002 Coordinate-Free Geometry When we learned simple geometry, most of us.
3D Geometry for Computer Graphics
Lecture 2: Geometry vs Linear Algebra Points-Vectors and Distance-Norm Shang-Hua Teng.
1 Computer Graphics Chapter 5 Vector Based Algorithms.
Vectors: planes. The plane Normal equation of the plane.
Copyright © Cengage Learning. All rights reserved. 10 Analytic Geometry in Three Dimensions.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Graphics CSE 581 – Interactive Computer Graphics Mathematics for Computer Graphics CSE 581 – Roger Crawfis (slides developed from Korea University slides)
Math Primer for CG Ref: Interactive Computer Graphics, Chap. 4, E. Angel.
1 1.9 © 2016 Pearson Education, Inc. Linear Equations in Linear Algebra THE MATRIX OF A LINEAR TRANSFORMATION.
7.1 Scalars and vectors Scalar: a quantity specified by its magnitude, for example: temperature, time, mass, and density Chapter 7 Vector algebra Vector:
Geometry CSC 2141 Introduction to Computer Graphics.
1 Geometry. 2 Objectives Introduce the elements of geometry ­Scalars ­Vectors ­Points Develop mathematical operations among them in a coordinate-free.
Section 13.4 The Cross Product. Torque Torque is a measure of how much a force acting on an object causes that object to rotate –The object rotates around.
Mathematical Foundations Sections A-1 to A-5 Some of the material in these slides may have been adapted from university of Virginia, MIT and Åbo Akademi.
Intro to 3D Models Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
6.837 Linear Algebra Review Patrick Nichols Thursday, September 18, 2003.
Mathematics for Graphics. 1 Objectives Introduce the elements of geometry  Scalars  Vectors  Points Develop mathematical operations among them in a.
Section 3.5 Lines and Planes in 3-Space. Let n = (a, b, c) ≠ 0 be a vector normal (perpendicular) to the plane containing the point P 0 (x 0, y 0, z 0.
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
1.3 Lines and Planes. To determine a line L, we need a point P(x 1,y 1,z 1 ) on L and a direction vector for the line L. The parametric equations of a.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 52 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 52 Computer Graphics Three-Dimensional Graphics I.
Background Mathematics Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006.
Vector Tools for Computer Graphics
CS 551 / 645: Introductory Computer Graphics Mathematical Foundations.
Chun-Yuan Lin Mathematics for Computer Graphics 2015/12/15 1 CG.
Basic Entities Scalars - real numbers sizes/lengths/angles Vectors - typically 2D, 3D, 4D directions Points - typically 2D, 3D, 4D locations Basic Geometry.
DOT PRODUCT CROSS PRODUCT APPLICATIONS
1 Graphics CSCI 343, Fall 2015 Lecture 9 Geometric Objects.
Computational Geometry 2012/10/23. Computational Geometry A branch of computer science that studies algorithms for solving geometric problems Applications:
Advanced Computer Graphics CS32310 October 2012 H Holstein.
Chi-Cheng Lin, Winona State University CS430 Computer Graphics Vectors Part I.
Computer Graphics I, Fall 2010 Geometry.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CSE 681 Brief Review: Vectors. CSE 681 Vectors Basics Normalizing a vector => unit vector Dot product Cross product Reflection vector Parametric form.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Geometry.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Parametric and general equation of a geometrical object O EQUATION INPUT t OUTPUT EQUATION INPUT OUTPUT (x, y, z)
David Luebke6/12/2016 CS 551 / 645: Introductory Computer Graphics David Luebke
Chapter I Vectors and Scalars AAIT Engineering Mechanics Statics Department of Tewodros N. Civil Engineering.
CSE 681 Brief Review: Vectors. CSE 681 Vectors Direction in space Normalizing a vector => unit vector Dot product Cross product Parametric form of a line.
CA 302 Computer Graphics and Visual Programming
Prof. Dr. Faisel Ghazi Mohammed
Chapter 2 Planes and Lines
Lesson 3-6: Perpendicular & Distance
VECTORS APPLICATIONS NHAA/IMK/UNIMAP.
Intersection between - Lines, - Planes and - a plane & a Line
3D Object Representation
CSC461: Lecture 12 Geometry Objectives
Y. Davis Geometry Notes Chapter 9.
By the end of Week 3: You would learn how to solve many problems involving lines/planes and manipulate with different coordinate systems. These are.
Introduction to Computer Graphics with WebGL
Lecture 2: Geometry vs Linear Algebra Points-Vectors and Distance-Norm
Linear Algebra Lecture 23.
3D Object Representation
CHAPTER 3 VECTORS NHAA/IMK/UNIMAP.
Presentation transcript:

3D Geometry for Computer Graphics Class 1

General Office hour: Sunday 11:00 – 12:00 in Schreiber 002 (contact in advance) Webpage with the slides:

The plan today Basic linear algebra and Analytical geometry

Why??

We represent objects using mainly linear primitives:  points  lines, segments  planes, polygons Need to know how to compute distances, transformations, projections…

Basic definitions Points specify location in space (or in the plane). Vectors have magnitude and direction (like velocity). Points  Vectors

Point + vector = point

vector + vector = vector Parallelogram rule

point - point = vector A B B – A A B A – B

point + point: not defined!!

Map points to vectors If we have a coordinate system with origin at point O We can define correspondence between points and vectors:

Inner (dot) product Defined for vectors:  L v w Projection of w onto v

Dot product in coordinates (2D) v w xvxv yvyv xwxw ywyw x y O

Perpendicular vectors (2D) v vv

Parametric equation of a line p0p0 v t > 0 t < 0 t = 0

Parametric equation of a ray p0p0 v t > 0 t = 0

Distance between two points B A xBxB yByB xAxA yAyA x y O

Distance between point and line Find a point q’ such that (q  q’)  v dist(q, l) = || q  q’ || p0p0 v q q’ = p 0 +tv l

Easy geometric interpretation p0p0 v q q’ l L

Distance between point and line – also works in 3D! The parametric representation of the line is coordinates-independent v and p 0 and the checked point q can be in 2D or in 3D or in any dimension…

Implicit equation of a line in 2D x y Ax+By+C > 0 Ax+By+C < 0 Ax+By+C = 0

Line-segment intersection x y Ax+By+C > 0 Ax+By+C < 0 Q 1 (x 1, y 1 ) Q 2 (x 2, y 2 )

Representation of a plane in 3D space A plane  is defined by a normal n and one point in the plane p 0. A point q belongs to the plane  = 0 The normal n is perpendicular to all vectors in the plane n p0p0 q 

Distance between point and plane Project the point onto the plane in the direction of the normal: dist(q,  ) = ||q’ – q|| n p0p0 q’  q

Distance between point and plane n p0p0 q’  q

Implicit representation of planes in 3D (x, y, z) are coordinates of a point on the plane (A, B, C) are the coordinates of a normal vector to the plane Ax+By+Cz+D > 0 Ax+By+Cz+D < 0 Ax+By+Cz+D = 0

Distance between two lines in 3D p1p1 p2p2 u v d The distance is attained between two points q 1 and q 2 so that (q 1 – q 2 )  u and (q 1 – q 2 )  v q1q1 q2q2 l1l1 l2l2

Distance between two lines in 3D p1p1 p2p2 u v d q1q1 q2q2 l1l1 l2l2

p1p1 p2p2 u v d q1q1 q2q2 l1l1 l2l2

p1p1 p2p2 u v d q1q1 q2q2 l1l1 l2l2

Barycentric coordinates (2D) Define a point’s position relatively to some fixed points. P =  A +  B +  C, where A, B, C are not on one line, and , ,   R. ( , ,  ) are called Barycentric coordinates of P with respect to A, B, C (unique!) If P is inside the triangle, then  +  +  =1, , ,  > 0 A B C P

Barycentric coordinates (2D) A B C P

Example of usage: warping

Tagret A B C We take the barycentric coordinates , ,  of P’ with respect to A’, B’, C’. Color( P ) = Color(  A +  B +  C )

See you next time!