80 likes | 188 Vues
This guide covers the fundamental concepts of triangles in 3D geometry, including definitions of non-collinear and collinear points, the significance of plane definitions, and the properties of front-facing triangles. It explores how to determine collinearity through determinants and highlights the importance of precise calculations in floating-point arithmetic. Additionally, it covers parametric and implicit equations for planes derived from triangles and provides methods for ray-plane intersection analysis, essential for computer graphics and geometric computations.
E N D
CS 33883D Triangles [online only] Enemy Territory: Quake Wars TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAA
Defining a Triangle non-collinear collinear • Three non-collinear points • Or, equivalently, point + two non-zero, non-parallel vectors • In 3D, triangle uniquely defines plane (2-flat) b a “degenerate triangle” c ¢b ¢a c plane that triangle “lives in” y set of all possible triangles set of all possible planes many-to-one z x
Collinearity Tests • Test if 2D points collinear: • Test if 3D points collinear: b a c remember, determinant related to area, so det=0 means area of triangle=0 memorize this WARNING: floating point not precise, so must check if ¼ 0 in practice! (annoying)
Front, or Back? • Do we care which way a triangle is ‘facing’? • yes! shading, backface culling • Def’n: front-facingiff points counter- clockwise when viewed from front • Front-facing normal is here • Try it: a b n (front-facing) ¡n c will talk about these more later on a and (0,0,1) is towards eye! b c
Plane Equations from Triangle • Parametric plane from triangle: • Parametric triangle? Already got one! p(1,1) ¢b c ¢a p(2,0)
Plane Equations from Triangle • Implicit plane from triangle: a b n Need normal n orthogonal to all vectors in plane, so choose c = distance of plane from origin (0,0) Need d so that is satisfied for points in plane, so substitute p=c (whatever form you find easier)
Ray-Plane Intersection (Implicit) n r ¢r p
Ray-Plane Intersection (Parametric) c ¢a ¢b r ¢r p