1 / 8

CS 3388 3D Triangles

CS 3388 3D Triangles. [online only]. Enemy Territory: Quake Wars . TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A. Defining a Triangle. non-collinear. collinear. Three non-collinear points

kanan
Download Presentation

CS 3388 3D Triangles

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 33883D Triangles [online only] Enemy Territory: Quake Wars TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAA

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

  3. 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)

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

  5. Plane Equations from Triangle • Parametric plane from triangle: • Parametric triangle? Already got one! p(1,1) ¢b c ¢a p(2,0)

  6. 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)

  7. Ray-Plane Intersection (Implicit) n r ¢r p

  8. Ray-Plane Intersection (Parametric) c ¢a ¢b r ¢r p

More Related