Example #1
0
def task_4_3():
    n = 3

    first_line = list(itr.islice(dr.gen_triangle(), n))
    second_line = list(itr.islice(dr.gen_triangle(), n))

    second_line = list(
        map(dr.tr_symmetry, second_line, [0] * n, [1.1] * n, [1] * n,
            [1.1] * n))

    dr.plot(first_line)
    dr.plot(second_line)

    dr.show()
    dr.clean()
Example #2
0
def task_3_4():
    fig = tuple(itr.islice(dr.gen_triangle(), 10))
    n = len(fig)
    fig1 = tuple(map(dr.tr_homothety, fig, [0] * n, [0] * n, [-1] * n))
    dr.plot(fig)
    dr.plot(fig1)
    dr.show()
Example #3
0
def task_3_2():
    fig = tuple(itr.islice(dr.gen_triangle(), 10))
    n = len(fig)
    fig1 = tuple(map(dr.tr_rotate, fig, [0] * n, [0] * n, [2] * n))
    dr.plot(fig)
    dr.plot(fig1)
    dr.show()
Example #4
0
def task_3_1():
    fig = tuple(itr.islice(dr.gen_triangle(), 10))
    n = len(fig)
    fig1 = tuple(map(dr.tr_translate, fig, [5] * n, [5] * n))
    dr.plot(fig)
    dr.plot(fig1)
    dr.show()
Example #5
0
def task_2_4():
    a = tuple(itr.islice(dr.gen_triangle(), 2))
    a = tuple(map(dr.tr_translate, a, [0] * 2, [1.5] * 2))
    b = tuple(itr.islice(dr.gen_hexagon(), 3))
    c = tuple(itr.islice(dr.gen_rectangle(), 3))
    c = tuple(map(dr.tr_translate, c, [0] * 3, [-1.5] * 3))
    dr.plot(a)
    dr.plot(b)
    dr.plot(c)
    dr.show()
Example #6
0
def task_2_2():
    fig = tuple(itr.islice(dr.gen_triangle(), 10))
    dr.plot(fig)
    dr.show()