Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def draw_2d_view(dots_to_draw):
- for pol in polygons:
- p1 = dots_to_draw[pol[0]-1]
- p2 = dots_to_draw[pol[1]-1]
- p3 = dots_to_draw[pol[2]-1]
- v1 = p2 - p1
- v2 = p3 - p1
- polNor = np.cross(v1,v2)
- print(polNor)
- if(np.dot(ociste,polNor) > 0):
- glPointSize(point_size);
- glColor3f(0, 0, 1)
- glBegin(GL_LINE_LOOP)
- for dot in pol:
- index = dot - 1
- glVertex2f(dots_to_draw[index][0], dots_to_draw[index][1])
- glEnd()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement