The following is code that I have written for a basic Airplane tail fin:
void Tail()
{
glBegin(GL_POLYGON);
glVertex3f(0,0,0);
glVertex3f(4,0,0.4);
glVertex3f(2,8,0.4);
glVertex3f(0,8,0);
glEnd();
glBegin(GL_POLYGON);//Back FACE green
glColor3f(0.0,0.0,1.0);
glVertex3f(0,0,1);
glVertex3f(4,0,0.6);
glVertex3f(2,8,0.6);
glVertex3f(0,8,1);
glEnd();
glBegin(GL_POLYGON);//lhs blue
glColor3f(0.0,0.0,1.0);
glVertex3f(4,0,0.4);
glVertex3f(4,0,0.6);
glVertex3f(2,8,0.6);
glVertex3f(2,8,0.4);
glEnd();
glBegin(GL_POLYGON);//RHS white
glColor3f(1.0,1.0,1.0);
glVertex3f(0,0,0);
glVertex3f(0,0,1);
glVertex3f(0,8,1);
glVertex3f(0,8,0);
glEnd();
glBegin(GL_POLYGON);//Top color
glColor3f(1.0,0.0,1.0);
glVertex3f(0,8,0);
glVertex3f(0,8,1);
glVertex3f(2,8,0.6);
glVertex3f(2,8,0.4);
glEnd();
glBegin(GL_POLYGON);//BOTTOM
glColor3f(0.0,1.0,1.0);
glVertex3f(0,0,0);
glVertex3f(4,0,0.4);
glVertex3f(4,0,.6);
glVertex3f(0,0,1);
glEnd();
glBegin(GL_POLYGON);//flaps
glColor3f(0,0,1);
glVertex3f(2,8,0.5);
glVertex3f(4,0,0.5);
glVertex3f(4.75,0,0.5);
glVertex3f(2.75,8,0.5);
glEnd();
}
The last polygon is for a flap, as it is on the slanted side of the wing I cannot seem to be able to move it up and down, Any help please