   3D Objects - Triangles, and Quars
  I dont understand how the Traiangles and Quads connect to eachother in this code.g1Vertex3f(information); I have the concept of straight triangles and quads. i.e.g1Vertex3f(0.0f,1.0f,0.0f); - Top of the Triangleg1Vertex3f(-1.0f,-1.0f,0.0f); - Bottom left of the Triangleg1Vertex3f(1.0f,-1.0f,0.0f); - Bottom Right of the TriangleBUTto make the another triangle to connect to it i.e THE RIGHT SIDE, I DONT UNDERSTAND how this worksg1Vertex3f(0.0f,1.0f,0.0f); = YES i understand how this point connectsg1Vertex3f(1.0f,-1.0f,1.0f); = I DONT UNDERSTANDg1Vertex3f(1.0f,-1.0f,-1.0f); = I DONT UNDERSTAND-------------The same is for all of the 3D items, the QUADS is hard to understand how they connect aswell. If you can explain to me how they connect that would BE AWESOME.Thank you.glBegin(GL_TRIANGLES);glColor3f(1.0f,0.0f,0.0f);glVertex3f(0.0f,1.0f,0.0f);glColor3f(0.0f,1.0f,0.0f);glVertex3f(-1.0f,-1.0f,1.0f);FRONTglColor3f(0.0f,0.0f,1.0f);glVertex3f(1.0f,-1.0f,1.0f);glColor3f(1.0f,0.0f,0.0f);glVertex3f(0.0f,1.0f,0.0f);glColor3f(0.0f,0.0f,1.0f);RIGHTglVertex3f(1.0f,-1.0f,1.0f);glColor3f(0.0f,1.0f,0.0f);glVertex3f(1.0f,-1.0f,-1.0f);glColor3f(1.0f,0.0f,0.0f);glVertex3f(0.0f,1.0f,0.0f);glColor3f(0.0f,1.0f,0.0f);BACKglVertex3f(1.0f,-1.0f,-1.0f);glColor3f(0.0f,0.0f,1.0f);glVertex3f(-1.0f,-1.0f,-1.0f);glColor3f(1.0f,0.0f,0.0f);glVertex3f(0.0f,1.0f,0.0f);glColor3f(0.0f,0.0f,1.0f);LEFTglVertex3f(-1.0f,-1.0f,-1.0f);glColor3f(0.0f,1.0f,0.0f);glVertex3f(-1.0f,-1.0f,1.0f);glEnd();glBegin(GL_QUADS);glColor3f(0.0f,1.0f,0.0f);glVertex3f(1.0f,1.0f,-1.0f);glVertex3f(-1.0f,1.0f,-1.0f);glVertex3f(-1.0f,1.0f,1.0f);glVertex3f(1.0f,1.0f,1.0f);glColor3f(1.0f,0.5f,0.5f); glVertex3f(1.0f,-1.0f,1.0f);glVertex3f(-1.0f,-1.0f,1.0f);glVertex3f(-1.0f,-1.0f,-1.0f);glVertex3f(1.0f,-1.0f,-1.0f);glColor3f(1.0f,0.0f,0.0f); glVertex3f(1.0f,1.0f,1.0f); glVertex3f(-1.0f,1.0f,1.0f);glVertex3f(-1.0f,-1.0f,1.0f);glVertex3f(1.0f,-1.0f,1.0f);glColor3f(1.0f,1.0f,0.0f); glVertex3f(1.0f,-1.0f,-1.0f);glVertex3f(-1.0f,-1.0f,-1.0f);glVertex3f(-1.0f,1.0f,-1.0f);glVertex3f(1.0f,1.0f,-1.0f);glColor3f(0.0f,0.0f,1.0f); glVertex3f(-1.0f,1.0f,1.0f);glVertex3f(-1.0f,1.0f,-1.0f);glVertex3f(-1.0f,-1.0f,-1.0f);glVertex3f(-1.0f,-1.0f,1.0f);glColor3f(0.5f,1.0f,0.5f);glVertex3f(1.0f,-1.0f,-1.0f);glVertex3f(1.0f,-1.0f,1.0f);glVertex3f(1.0f,1.0f,1.0f);glVertex3f(1.0f,1.0f,-1.0f);glEnd();   
  A triangle is made up of 3 points.  I'm not sure at the moment what 3D object this is making, likely a 4 sided pyramid which has 5 points.  Anyway, if that is the case then all object's triangles will share a point at the top of the pyramid, and that is all.  If it is a 3 sided pyramid with a bottom then there are 4 points.  So let us begin by labelling all points.(Ignoring the calls to glColor3f)glBegin(GL_TRIANGLES);// FrontglVertex3f(0.0f,1.0f,0.0f);   // Point AglVertex3f(-1.0f,-1.0f,1.0f); // Point BglVertex3f(1.0f,-1.0f,1.0f);  // Point C//RightglVertex3f(0.0f,1.0f,0.0f);   // Point AglVertex3f(1.0f,-1.0f,1.0f);  // Point CglVertex3f(1.0f,-1.0f,-1.0f); // Point D//BackglVertex3f(0.0f,1.0f,0.0f);   // Point AglVertex3f(1.0f,-1.0f,-1.0f); // Point DglVertex3f(-1.0f,-1.0f,-1.0f);// Point E//LeftglVertex3f(0.0f,1.0f,0.0f);   // Point AglVertex3f(-1.0f,-1.0f,-1.0f);// Point EglVertex3f(-1.0f,-1.0f,1.0f); // Point BglEnd();So this is a 4 sided pyramid with point A being the top Point and B, C, D, and E the bottom points with no bottom(apparently).  It would have a quad for the bottom or two triangles with points involving B, C, D, or ESo all you have to do is remember the points, and label them, to get a better idea of the shape.  Picture the actual shape in your mind and count the points as well and compare them.  Hope that helps.   