import random

background = Rectangle(color=['green', 'cyan'])

Line(points=[(50, 10), (51, 10)], color='mediumspringgreen')

Line(points=[(10, 80), (11, 80)], color='mediumspringgreen')
Line(points=[(90, 80), (91, 80)], color='mediumspringgreen')

masp=[[(50, 10), (51, 10)],
      [(10, 80), (11, 80)],
      [(90, 80), (91, 80)]]




lastpoint = [(40, 40), (41, 40)]


for i in range(0, 229):
    n=int(random.random() * 3)

    Line(points=lastpoint)
    lastX=(lastpoint[0][0]+masp[n][0][0])/2
    lastY=(lastpoint[0][1]+masp[n][0][1])/2
    lastpoint=[(lastX, lastY), (lastX+1, lastY)]

Treugolnik

by Nkta

Created 1 year, 3 months ago.