SlideServe
Menu
Préférences
© SlideServe · v2026

3D Geometry for Computer Graphics

gregr avatar
35 diapositives · 479 Views · Jan 03, 2020

Learn basic linear algebra and analytical geometry to represent objects in computer graphics. Explore points, vectors, lines, planes, and polygons. Understand distances, transformations, and projections. Study parametric equations, implicit representations, and barycentric coordinates.

3D Geometry for Computer Graphics - slide 1
01 / 353D Geometry for Computer Graphics
1 / 17

Télécharger la présentation

3D Geometry for Computer Graphics
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. 3D Geometry forComputer Graphics Class 1

  2. General • Office hour: Sunday 11:00 – 12:00 in Schreiber 002 (contact in advance) • Webpage with the slides: http://www.cs.tau.ac.il/~sorkine/courses/cg/cg2005/ • E-mail: sorkine@tau.ac.il

  3. The plan today • Basic linear algebra and • Analytical geometry

  4. Why??

  5. Why?? • We represent objects using mainly linear primitives: • points • lines, segments • planes, polygons • Need to know how to compute distances, transformations, projections…

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

  7. Point + vector = point

  8. vector + vector = vector Parallelogram rule

  9. point - point = vector B – A B A A – B B A

  10. point + point: not defined!!

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

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

  13. Dot product in coordinates (2D) y yw w yv v xw xv x O

  14. Perpendicular vectors (2D) v v

  15. Parametric equation of a line v t > 0 p0 t = 0 t < 0

  16. Parametric equation of a ray v t > 0 p0 t = 0

  17. Distance between two points y A yA B yB xA xB x O

  18. Distance between point and line q v q’ = p0+tv p0 Find a point q’ such that (q q’)v dist(q, l) = || q  q’ || l

  19. Easy geometric interpretation q l v q’ p0 L

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

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

  22. Line-segment intersection Q1 (x1, y1) y Ax+By+C > 0 Q2 (x2, y2) Ax+By+C < 0 x

  23. Representation of a plane in 3D space • A plane  is defined by a normal n and one point in the plane p0. • A point q belongs to the plane  < q – p0, n > = 0 • The normal n is perpendicular to all vectors in the plane n q p0 

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

  25. Distance between point and plane n q q’ p0 

  26. 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

  27. Distance between two lines in 3D q1 l1 p1 u d p2 v l2 q2 The distance is attained between two points q1 and q2 so that (q1 – q2) u and (q1 – q2) v

  28. Distance between two lines in 3D q1 l1 p1 u d p2 v l2 q2

  29. Distance between two lines in 3D q1 l1 p1 u d p2 v l2 q2

  30. Distance between two lines in 3D q1 l1 p1 u d p2 v l2 q2

  31. 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 C P A B

  32. Barycentric coordinates (2D) C P A B

  33. Example of usage: warping

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

  35. See you next time!