1 Planes, Polygons and Objects ©Anthony Steed 1999-2005.

Slides:



Advertisements
Similar presentations
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 9 Adding Realism Through Texture.
Advertisements

COMP 175 | COMPUTER GRAPHICS Remco Chang1/6103b – Shapes Lecture 03b: Shapes COMP 175: Computer Graphics February 3, 2015.
Computer Graphics1 Geometry Area of polygons & Volume Of Polygonal surfaces.
Vector Calculus Mengxia Zhu Fall Objective Review vector arithmetic Distinguish points and vectors Relate geometric concepts to their algebraic.
Intersection Testing Chapter 13 Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Geometry Primer Lines and rays Planes Spheres Frustums Triangles Polygon Polyhedron.
Mean Value Coordinates for Closed Triangular Meshes
Polygons – Concave and Convex Turning Point Quiz Copyright © 2010 Kelly Mott.
Advanced Computer Graphics Spring 2014
Chapter 12: Surface Area and Volume of Solids

MA Day 9 – January 17, 2013 Review: Equations of lines, Section 9.5 Section 9.5 –Planes.
Computer Graphics - Class 14
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:
Polygonal Meshes 3D Object Representation -Tyler Abrams.
Computer Graphics Recitation 1. General Office hour: Sunday 16:00 – 17:00 in Schreiber 002 Webpage with the slides:
Chapter 16 – Vector Calculus
1 Computer Graphics Chapter 5 Vector Based Algorithms.
X y z Point can be viewed as intersection of surfaces called coordinate surfaces. Coordinate surfaces are selected from 3 different sets.
Vectors: planes. The plane Normal equation of the plane.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
Week 13 - Wednesday CS361.
Curves and Surfaces (cont’) Amy Zhang. Conversion between Representations  Example: Convert a curve from a cubic B-spline curve to the Bézier form:
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Vectors Tools for Graphics.  To review vector arithmetic, and to relate vectors to objects of interest in graphics.  To relate geometric concepts to.
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
CS 3388 Working with 3D Vectors
Vectors Jeff Chastine.
Introduction to 3D Graphics Lecture 4: Scenes and Scene Graphs Anthony Steed University College London.
1 Ray Tracing Polyhedra ©Anthony Steed
Vertex – A point at which two or more edges meet Edge – A line segment at which two faces intersect Face – A flat surface Vertices, Edges, Faces.
What shape is this? What is special about this shape? How many vertices? How many faces? How many sides? What shapes are these? Identify the Faces, Edges,
Mathematics for Graphics. 1 Objectives Introduce the elements of geometry  Scalars  Vectors  Points Develop mathematical operations among them in a.
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.
Spaces 1D, 2D, and 3D Point Line Plan Points/Vectors A point p = (x,y,z) is also the vector p Vector Operation The Length of the vector v Normalization.
Chapter 2 Section 2.4 Lines and Planes in Space. x y z.
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
Computer Graphics Basic 3D Geometry CO2409 Computer Graphics Week 5-1.
1 Dr. Scott Schaefer Intersecting Simple Surfaces.
Basic Ray Tracing CMSC 435/634.
Vertices, Edges and Faces By Jordan Diamond. Vertices In geometry, a vertices is a special kind of point which describes the corners or intersections.
DOT PRODUCT CROSS PRODUCT APPLICATIONS
12.1 Exploring Solids.
In the name of God Computer Graphics Bastanfard. Curve Function(2) Other method is approximate it using a poly-line. Just locate a set of points along.
Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 32 of 42 Wednesday, 11.
Determining 3D Structure and Motion of Man-made Objects from Corners.
Introduction to Meshes Lecture 22 Mon, Oct 20, 2003.
Section 12-1 Exploring Solids. Polyhedron Three dimensional closed figure formed by joining three or more polygons at their side. Plural: polyhedra.
1 Planes, Polygons and Objects ©Anthony Steed
RENDERING : Global Illumination
Computer Graphics I, Fall 2010 Geometry.
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.
CSE 681 Object Intersection. CSE 681 Object Representation Implicit forms F(x,y,z) = 0 Explicit forms Analytic form x = F(y,z) testing generating Parametric.
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.
Goal 1: Using Properties of Polyhedra Goal 2: Using Euler’s Theorem
Constructing Objects in Computer Graphics
Intersecting Simple Surfaces
Points, Vectors, Lines, Spheres and Matrices
VECTORS APPLICATIONS NHAA/IMK/UNIMAP.
Constructing Objects in Computer Graphics By Andries van Dam©
Lines and Planes in Space
Vectors Jeff Chastine.
Math 200 Week 3 - Monday Planes.
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.
Computing Vertex Normals from Arbitrary Meshes
Ray Tracing Polyhedra ©Anthony Steed
Creating Meshes Through Functions
Meshes Generated by Functions
Presentation transcript:

1 Planes, Polygons and Objects ©Anthony Steed

2 Overview n Polygons n Planes n Creating an object from polygons

3 No More Spheres n Most things in computer graphics are not described with spheres! n Polygonal meshes are the most common representation n Look at how polygons can be described and how they can used in ray-casting

4 Polygonal Meshes

5 Polygons n A polygon (face) Q is defined by a series of points n The points are must be co-planar n 3 points define a plane, but a 4th point need not lie on that plane

6 Convex, Concave n Convex n Concave CG people dislike concave polygons CG people would prefer triangles!! –Easy to break convex object into triangles, hard for concave

7 Equation of a Plane n a,b,c and d are constants that define a unique plane and x,y and z form a vector P.

8 Deriving a,b,c & d (1) p 0 p 2 p 1 p n The cross product defines a normal to the plane n There are two normals (they are opposite) n Vectors in the plane are all orthogonal to the plane normal vector

9 Deriving a,b,c & d (2) n So p-p 0 is normal to n therefore n But if n = (n 1,n 2,n 3 ) a= n 1 b= n 2 c= n 3 (n.p) d = n.p0 = n 1 *x 0 + n 2 *y 0 + n 3* z 0

10 Half-Space n A plane cuts space into 2 half-spaces n Define n If l(p) =0 point on plane n If l(p) > 0 point in positive half-space n If l(p) <0 point in negative half-space

11 Polyhedra n Polygons are often grouped together to form polyhedra Each edge connects 2 vertices and is the join between two polygons Each vertex joins 3 edges No faces intersect n V-E+F=2 For cubes, tetrahedra, cows etc...

12 Example Polhedron vo v1 v2 v3 v4 v5 e1 e2 e3 e4 e5 e6 e7 e9 e8 n F0=v0v1v4 n F1=v5v3v2 n F2=v1v2v3v4 n F3=v0v4v3v5 n F4=v0v5v2v1 n V=6,F=5, E=9 n V-E+F=2

13 Representing Polyhedron (1) n Exhaustive (array of vertex lists) faces[1] = (x0,y0,z0),(x1,y1,z1),(x3,y3,z3) faces[2] = (x2,y2,z2),(x0,y0,z0),(x3,y3,z3) etc …. n Very wasteful since same vertex appears at 3(or more) points in the list Is used a lot though!

14 Representing Polyhedron (2) n Indexed Face set n Vertex array vertices[0] = (x0,y0,z0) vertices[1]=(x1,y1,z1) etc … n Face array (list of indices into vertex array) faces[0] = 0,2,1 faces[1]=2,3,1 etc...

15 Vertex order matters n Polygon v0,v1,v4 is NOT equal to v0,v4,v1 n The normal point in different directions n Usually a polygon is only visible from points in its positive half-space n This is known as back- face culling vo v1 v2 v3 v4 v 5

16 Representing Polyhedron (3) n Even Indexed face set wastes space Each face edge is represented twice n Winged edge data structure solves this vertex list edge list (vertex pairs) face list (edge lists)

17 The Edge List Structure n Edge contains Next edge CW Next edge CCW Prev edge CW Prev edge CCW Next face Prev face Next vertex Prev vertex

18 Advantages of Winged Edge n Simple searches are rapid find all edges find all faces of a vertex etc… n Complex operations polygon splitting is easy (LOD) silhouette finding potentially efficient for hardware etc…

19 Building the WE n Build indexed face set n Traverse each face in CCW order building edges label p and n vertices, p and n faces and link previous CCW edge –we fill in next CCW on next edge in this face –we fill in next CW and prev CW when traversing the adjacent face.

20 Exercises n Make some objects using index face set structure n Verify that V-E+F=2 for some polyhedra n Think about testing for intersection between a ray and a polygon (or triangle)

21 Recap n We have seen definition of planes and polygons and their use in approximating general shapes n We have looked at two data structures for storing shapes Indexed face sets Winged edge data sets n The former is easy to implement and fast for rendering n The latter is more complex, but makes complex queries much faster n It is possible, though we haven’t shown how, to convert between the two