Esempio n. 1
0
def Display():
    glClear(GL_COLOR_BUFFER_BIT)

    for i in range(len(points)):
        x0 = points[i][0]
        y0 = points[i][1]
        x1 = points[i][2]
        y1 = points[i][3]

        if flag[i] == True:
            cglib.ddaLine_Simple(x0, y0, x1, y1)
        else:
            print "\n points[i] Line clipped\n"

    glColor3f(1.0, 0.0, 0.0)
    drawWindow()
Esempio n. 2
0
def Display():

    glClear(GL_COLOR_BUFFER_BIT)
    global choice

    if choice == 1:
        cglib.parametricCircle(x, y, r)

    if choice == 2:
        global l1
        for i in range(len(l1)):
            x0, y0, x1, y1 = l1[i][0], l1[i][1], l1[i][2], l1[i][3]
            cglib.ddaLine_Simple(x0, y0, x1, y1)

    if choice == 3:
        global xc, yc, rx, ry
        cglib.midpointEllipse(xc, yc, rx, ry)
Esempio n. 3
0
def Display():
    glClear(GL_COLOR_BUFFER_BIT)
    cglib.ddaLine_Simple(x0, y0, x1, y1)