P5 concave more difficult p4 p0 p1 p3 p2 polygon

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: nates ● •Mean value coordinates •Dividing polygons into triangles Polygon Decomposition For polygons with more than three vertices, we usually decompose them into triangles P6 P7 Simple for convex polygons. P5 Concave more difficult. P4 P0 P1 P3 P2 Polygon Decomposition: Algorithm Start from the left and form the leftmost triangle: •Find leftmost vertex (smallest x) – A •Compose possible triangle out of A and the two adjacent vertices B and C •Check to ensure that no other polygon point P is inside of triangle ABC •If all other polygon points are outside of ABC then cut it off from polygon and proceed with next leftmost triangle Polygon decomposition (2) •The left most vertex A •A triangle is formed by A and the two adjacent B and C •Check if all the other vertices are outside the triangle Polygon decomposition (3) If a vertex is inside, split the polygon by the inside vertex and point A, proceed as before. Polygon decomposition (4) This edge may split the polygon into two. Then, recurse the method with each polygon (ABCDE and AEFGH in the example below) Summary Rasterization •Line Rasterization - Midpoint algorithm •Triangle Rasterization - barycentric coordinates •Mean value coordinates •Dividing polygons into triangles Reading for rasterization Scanline algorithm Foley et al., Chapter 3.5, 3.6 Baricentric coordinates www.cs.caltech.edu/courses/cs171/barycentric.pdf Mean value coordinates for closed triangular meshes, SIGGRAPH 2005 Polygon decomposition http://www.siggraph. org/education/materials/HyperGraph/scanline/outprims/ polygon1.htm *...
View Full Document

Ask a homework question - tutors are online