I have three basic functions that draw a surface, the first one is drawing the surface;
def deflected_3d_surface(self, array):
glBegin(GL_QUADS)
for d in range(int(array.shape[0] / 2 - 1)):
glColor4f(1, 1, 1, 1)
glVertex3fv(array[2 * d + 2, :])
glVertex3fv(array[2 * d, :])
glVertex3fv(array[2 * d + 1, :])
glVertex3fv(array[2 * d + 3, :])
glEnd()
the second one drawing the outer edges of that surface;
def deflected_3d_edges(self, array2):
glBegin(GL_LINES)
for i in range(array2.shape[0] - 1):
glColor3fv((0, 0, 0))
glVertex3fv(array2[i, :])
glVertex3fv(array2[i + 1, :])
glEnd()
the third one is drawing lines on that surface; (note that the line vertices and the surface vertices are not the same)
def deflected_3d_inner_edges(self, x_array, y_array, z_array):
glBegin(GL_LINES)
for i in range(x_array.shape[0]):
glColor3fv((0, 0, 0))
glVertex3fv([x_array[i, 0], y_array[i, 0], z_array[i, 0]])
glVertex3fv([x_array[i, 1], y_array[i, 1], z_array[i, 1]])
if x_array.shape[1] != 2:
glVertex3fv([x_array[i, 1], y_array[i, 1], z_array[i, 1]])
glVertex3fv([x_array[i, 2], y_array[i, 2], z_array[i, 2]])
glEnd()
When I call these functions with the following order;
`glWidget.deflected_3d_edges(self, self.tf1_edges_array)
glWidget.deflected_3d_edges(self, self.tf2_edges_array)
glWidget.deflected_3d_edges(self, self.bf1_edges_array)
glWidget.deflected_3d_edges(self, self.bf2_edges_array)
glWidget.deflected_3d_inner_edges(self, self.xbcr_, self.ybcr_,
self.zbcr_)
glWidget.deflected_3d_inner_edges(self, self.xwcr_, self.ywcr_,
self.zwcr_)
glWidget.deflected_3d_inner_edges(self, self.xtcr_, self.ytcr_,
self.ztcr_)`
Any ideas how I can fix the black lines appearing on the white surface?