Hi All:
I’m working on demonstrate the classic T-junction problem. So I create several rectangles in two rows like this:
glColor3f(1.0f, 0.0f, 0.0f);//red
for(int i=-50; i<50; i+=10)
{
glBegin(GL_QUADS);
glNormal3f(-1, 0,1);
glVertex3f(i, 20.0f, 0.0f);
glNormal3f(-1, 0,1);
glVertex3f(i+10, 20.0f, 0.0f);
glNormal3f(-1, 0,1);
glVertex3f(i+10, 0.0f, 0.0f);
glNormal3f(-1, 0, 1);
glVertex3f(i, 0.0f, 0.0f);
glEnd();
}
glColor3f(0.0f, 1.0f, 0.0f);//green
for(int i=-50; i<50; i+=6)
{
glBegin(GL_QUADS);
glNormal3f(0, 0, 1);
glVertex3f(i, 0.0f, 0.0f);
glNormal3f(0, 0, 1);
glVertex3f(i+6, 0.0f, 0.0f);
glNormal3f(0, 0, 1);
glVertex3f(i+6, -20.0f, 0.0f);
glNormal3f(0, 0, 1);
glVertex3f(i, -20.0f, 0.0f);
glEnd();
}
The first row rectangles are 1020 with normal vector (-1, 0, 1) and second row rectangles are 620 with normal vector (0, 0, 1). They share edges but vertices are not in the same coordinate. And I put the camera on (0, 0, 80) and a light on (0,0,10). Then I rotate it, I found some zig-zag between the red and greed edges, is it a T-junction artifact? I’m not sure, if not, please give me some hints about how to create the T-junction artifact. Thanks!!!