



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An in-depth exploration of polygon models, also known as polygon meshes. Topics covered include the evaluation of polygon model representation, explicit and indexed mesh descriptions, drawing 3-d triangle meshes, shading triangles, computing normals on triangle meshes, drawing wireframe meshes, optimizing drawing with triangle strips and fans, and the origin of meshes. The document also discusses the challenges of dealing with large polygon models and the current research being conducted to address these issues.
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!




n^
m
Drawing the Mesh: glBegin(GL_TRIANGLES);
for(int j=0; j<n; j++){
glVertex3f(…);glVertex3f(…);glVertex3f(…); } glEnd();
for(int j=0; j<n; j++){
glColor3fv(c);glVertex3fv(v1);glVertex3fv(v2);glVertex3fv(v3); } glEnd();
Smooth Shaded: glBegin(GL_TRIANGLES);
for(int j=0; j<n; j++){
glColor3fv(c1);glVertex3fv(v1);glColor3fv(c2);glVertex3fv(v2);glColor3fv(c3);glVertex3fv(v3); } glEnd();
for(int j=0; j<n; j++){
glNormal3fv(n);glVertex3fv(v1);glVertex3fv(v2);glVertex3fv(v3); } glEnd();
Smooth Shaded: glBegin(GL_TRIANGLES);
for(int j=0; j<n; j++){
glNormal3fv(n1);glVertex3fv(v1);glNormal3fv(n2);glVertex3fv(v2);glNormal3fv(n3);glVertex3fv(v3); }
A lot like triangle strips
glBegin(GL_TRIANGLE_FAN);
glVertex3fv(v1);glVertex3fv(v2);glVertex3fv(v3);
// Triangle A
glVertex3fv(v4);
// Triangle B
glVertex3fv(v5);
// Triangle C
glVertex3fv(v6);
// Triangle D
glEnd();
2
3
4
5
6
after
gzip compression
70,000 triangles
10,000 triangles
3000 triangles