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,

Slides:



Advertisements
Similar presentations
5.1 Real Vector Spaces.
Advertisements

Euclidean m-Space & Linear Equations Euclidean m-space.
Vector Calculus Mengxia Zhu Fall Objective Review vector arithmetic Distinguish points and vectors Relate geometric concepts to their algebraic.
Informationsteknologi Wednesday, November 7, 2007Computer Graphics - Class 51 Today’s class Geometric objects and transformations.
Even More Vectors.
Rubono Setiawan, S.Si.,M.Sc.
Chapter 12 – Vectors and the Geometry of Space
PARAMETRIC EQUATIONS AND POLAR COORDINATES 9. Usually, we use Cartesian coordinates, which are directed distances from two perpendicular axes. Here, we.
University of North Carolina at Greensboro
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Linear Equations in Linear Algebra
Vectors.
VECTORS AND THE GEOMETRY OF SPACE Vectors VECTORS AND THE GEOMETRY OF SPACE In this section, we will learn about: Vectors and their applications.
VECTORS AND THE GEOMETRY OF SPACE 12. VECTORS AND THE GEOMETRY OF SPACE A line in the xy-plane is determined when a point on the line and the direction.
Lines and Planes in Space
11 Analytic Geometry in Three Dimensions
Copyright © Cengage Learning. All rights reserved. 10 Analytic Geometry in Three Dimensions.
Section 9.5: Equations of Lines and Planes
Vectors and the Geometry of Space
Copyright © 2013, 2009, 2005 Pearson Education, Inc. 1 5 Systems and Matrices Copyright © 2013, 2009, 2005 Pearson Education, Inc.
Vector Exercise. Parametric form for a line Passing two points.
Chapter 9-Vectors Calculus, 2ed, by Blank & Krantz, Copyright 2011 by John Wiley & Sons, Inc, All Rights Reserved.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Linear Equations in Linear Algebra
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.
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Monday, 26 January 2004 William H. Hsu Department of.
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Wednesday, January 19, 2000 William H. Hsu Department.
ME 1202: Linear Algebra & Ordinary Differential Equations (ODEs)
Equations of Lines Chapter 8 Sections
Vectors and the Geometry of Space 9. Vectors 9.2.
Copyright © Cengage Learning. All rights reserved. 12 Vectors and the Geometry of Space.
Geometry of R 2 and R 3 Lines and Planes. Point-Normal Form for a Plane R 3 Let P be a point in R 3 and n a nonzero vector. Then the plane that contains.
Copyright © Cengage Learning. All rights reserved. 12 Vectors and the Geometry of Space.
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.
Vectors CHAPTER 7. Ch7_2 Contents  7.1 Vectors in 2-Space 7.1 Vectors in 2-Space  7.2 Vectors in 3-Space 7.2 Vectors in 3-Space  7.3 Dot Product 7.3.
1 1.5 © 2016 Pearson Education, Inc. Linear Equations in Linear Algebra SOLUTION SETS OF LINEAR SYSTEMS.
Chapter Content Real Vector Spaces Subspaces Linear Independence
1 1.3 © 2012 Pearson Education, Inc. Linear Equations in Linear Algebra VECTOR EQUATIONS.
Euclidean m-Space & Linear Equations Systems of Linear Equations.
Linear Interpolation (for curve 01).  This chapter discusses straight lines and flat surfaces that are defined by points.  The application of these.
Vectors Addition is commutative (vi) If vector u is multiplied by a scalar k, then the product ku is a vector in the same direction as u but k times the.
Vector Space o Vector has a direction and a magnitude, not location o Vectors can be defined by their I, j, k components o Point (position vector) is a.
Equations of Lines and Planes
Vector Tools for Computer Graphics
VECTORS AND THE GEOMETRY OF SPACE 12. PLANES Thus, a plane in space is determined by:  A point P 0 (x 0, y 0, z 0 ) in the plane  A vector n that is.
DOT PRODUCT CROSS PRODUCT APPLICATIONS
1 Graphics CSCI 343, Fall 2015 Lecture 9 Geometric Objects.
Chi-Cheng Lin, Winona State University CS430 Computer Graphics Vectors Part III Intersections.
Week 4 Functions and Graphs. Objectives At the end of this session, you will be able to: Define and compute slope of a line. Write the point-slope equation.
CSCE 552 Fall 2012 Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Copyright © Cengage Learning. All rights reserved. 16 Vector Calculus.
Section 1-1 Points and Lines. Each point in the plane can be associated with an ordered pair of numbers, called the coordinates of the point. Each ordered.
LECTURE 5 OF 8 Topic 5: VECTORS 5.5 Application of Vectors In Geometry.
Vector 2.
Lecture 5 Basic geometric objects
University of North Carolina at Greensboro
Chapter 2 Planes and Lines
HW # , ,64 , ,38 , Row 3 Do Now Find a set of parametric equations to represent the graph of y = -2x + 1 using the.
Copyright © Cengage Learning. All rights reserved.
VECTORS APPLICATIONS NHAA/IMK/UNIMAP.
11 Vectors and the Geometry of Space
C H A P T E R 3 Vectors in 2-Space and 3-Space
Linear Equations in Linear Algebra
Vectors and the Geometry
Vectors and the Geometry
Copyright © Cengage Learning. All rights reserved.
Linear Equations in Linear Algebra
11 Vectors and the Geometry of Space
Linear Equations in Linear Algebra
Vectors and the Geometry
Presentation transcript:

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, and three mutually perpendicular unit vectors: a, b, and c.

vectors and points have different representations: there is a fourth component of 0 for a vector and 1 for a point.

Convert bw. ordinary and homogeneous coordinates zTo go from ordinary to homogeneous coordinates:  if it’s a point append a 1;  if it’s a vector, append a 0; zTo go from homogeneous coordinates to ordinary coordinates:  If it’s a vector its final coordinate is 0. Delete the 0.  If it’s a point its final coordinate is 1 Delete the 1.

OpenGL uses 4D homogeneous coordinates zOpenGL uses 4D homogeneous coordinates for all its vertices.  If you send it a 3-tuple in the form ( x, y, z), it converts it immediately to ( x, y, z, 1).  If you send it a 2D point ( x, y), it first appends a 0 for the z-component and then a 1, to form ( x, y, 0, 1). All computations are done within OpenGL in 4D homogeneous coordinates.

Linear Combinations of Vectors  The difference of two points ( x, y, z, 1) and ( u, v, w, 1) is ( x - u, y - v, z - w, 0), which is, as expected, a vector.  The sum of a point ( x, y, z, 1) and a vector ( d, e, f, 0) is (x + d, y + e, z + f, 1), another point;  Two vectors can be added: ( d, e, f, 0) + ( m, n, r, 0) = (d + m, e + n, f + r, 0) which produces another vector;  It is meaningful to scale a vector: 3(d, e, f, 0) = ( 3 d, 3 e, 3 f, 0);  It is meaningful to form any linear combination of vectors. Let the vectors be v = (v1, v2, v3, 0) and w = (w1, w2, w3, 0). Then using arbitrary scalars a and b, we form av + bw = (av1 + bw1, av2 + bw2, av3 + bw3, 0), which is a legitimate vector.

Affine Combinations of Points zForming a linear combination of vectors is well defined, but does it make sense for points? The answer is no, except in one special case zFact: any affine combination of points is a legitimate point.

What’s wrong geometrically with forming any linear combination of two points

The failure of a simple sum P1 + P2 of two points to be a true point

Linear Interpolation of two points  Consider forming a point as a point A offset by a vector v that has been scaled by scalar t: A + tv. This is the sum of a point and a vector so it is a legitimate point. If we take as vector v the difference between some other point B and A: v = B - A then we have the point P: yP = A + t(B - A) zwhich is also a legitimate point. But now rewrite it algebraically as: yP = tB + (1 - t)A

Tween  P(t) that is fraction t of the way along the straight line from point A to point B. This point is often called the Tween (for in- between t of points A and B. Each component of the resulting point is formed as the ler p() of the corresponding components of A and B.

Tweening for Art and Animation.  Interesting animations can be created that show one figure being Tweened into another. It‘s simplest if the two figures are polylines (or families of polylines) based on the same number of points. Suppose the first figure, A, is based on the polyline with points A i, and the second polyline, B, is based on points B i, for i = 0,..., n-1. We can form the polyline P(t), called the Tween at t by forming the points:

Representing Lines and Planes

The parametric representation of a line  This is done using a parameter t that distinguishes one point on the line from another. Call the line L, and give the name L(t) to the position associated with t. Using b = B - A we have:  L(t) = A + b t |t| is the ratio of the distances | L(t) - A| to |B - A|,

Exercise  Example A line in 2D. Find a parametric form for the line that passes through C= (3, 5) and B = (2,7).  Solution: Build vector b = B - C = (-1, 2) to obtain the parametric form L(t) = (3 - t, t).  Example A line in 3D. Find a parametric form for the line that passes through C= (3, 5,6) and B = (2,7,3).  Solution: Build vector b = B - C = (-1, 2, -3) to obtain the parametric form L(t) = (3 - t, 5+ 2 t, 6 - 3t).

Point normal form for a line (the implicit form)  f x + g y = 1

Exercise zExample Find the point normal form.  Suppose line L passes through points C = (3, 4) and B = (5, -2). Then b = B - C = (2, -6) and b ‘s normal = (6, 2) Choosing C as the point on the line, the point normal form is: (6, 2). ((x, y) - (3, 4)) = 0, or 6x + 2y = 26. Both sides of the equation can be divided by 26 (or any other nonzero number) if desired.  f x + g y = 1. Writing this once again as (f, g).(x, y) = 1 it is clear that the normal n is simply (f, g) (or any multiple thereof). For instance, the line given by 5x - 2y = 7 has normal vector (5, -2), or more generally K(5, - 2) for any nonzero K.

Moving from each representation to the others. zThe three representations and their data are:  The two point form: say C and B; data = { C, B}  The parametric form: C + b t; data = { C, b}.  The point normal (implicit) form (in 2D only): n. (P - C) = 0; data = { C, n}.

Planes in 3D space. zPlanes, like lines, have three fundamental forms: ythe three-point form, ythe parametric representation and ythe point normal form.

The parametric representation of a plane.

Example Find a parametric form given three points in a plane. Consider the plane passing through A = (3,3,3), B = (5,5,7), and C = (1, 2, 4). From Equation 4.43 it has parametric form P(s, t) = (1, 2, 4) + (2, 1, - 1) s + (4, 3, 3) t. This can be rearranged to the component form: P(s, t) = (1 + 2 s + 4 t) i + (2 + s + 3 t) j + (4 - s + 3 t) k, or to the affine combination form P(s, t) = s(3, 3, 3) + t(5, 5, 7) + (1 - s - t)(1,2, 4).

The point normal form for a plane.

Exercise zFind a point normal form. Let plane P pass through (1, 2, 3) with normal vector (2, -1, -2). Its point normal form is (2, -1, -2).((x, y, z) - (1, 2, 3)) = 0. The equation for the plane may be written out as 2x - y - 2z = 6.

Exercise zFind a parametric form given the equation of the plane. Find a parametric form for the plane 2 x - y + 3 z = 8. Solutio n: By inspection the normal is (2, - 1, 3). There are many parametrizations; we need only find one. For C, choose any point that satisfies the equation; C = (4, 0, 0) will do. Find two (noncollinear) vectors, each having a dot product of 0 with (2, - 1, 3); some hunting finds that a = (1, 5, 1) and b = (0, 3, 1) will work. Thus the plane has parametric form P(s, t) = (4, 0, 0) + (1, 5, 1) s + (0, 3, 1) t.

Find two noncolinear vectors za = (0, 0, 1) x n zb = n x a

Moving from each representation to the others. zFor a plane, the three representations and their data are:  The three point form: say C, B, and A; data = { C, B, A}  The parametric form: C + as + b t; data = { C, a, b}.  The point normal (implicit) form: n. (P - C) = 0; data = { C, n}.

Finding the Intersection of two Line Segments.

 AB(t) = A + b t  CD(u) = C + d u,  intersect: A + bt = C + du  Defining c = C - A for convenience we can write this condition in terms of three known vectors and two (unknown) parameter values:  bt = c + du

4.6.1: Given the endpoints A = (0, 6), B = (6, 1), C = (1, 3), and D = (5, 5), find the intersection if it exists. Solution: d ^ = (-2,4), so t = 7/16 and u = 13/32 which both lie between 0 and 1, and so the segments do intersect. The intersection lies at (x, y) = (21/8, 61/16). This result may be confirmed visually by drawing the segments on graph paper and measuring the observed intersection. Example

Parallel and overlap

Find the center of a circle

Intersection of lines with planes zHit point zR(t) = A + ct zn.(p-B) =0 zt hit = n.(B-A)/n.c

Intersection of two planes zOne parametric form zone point normal form

Convex polygon zConnecting any two points lies completely inside it