[code]# 12/08/2023[br]from random import*[br]import time[br]#from math import*[br]# background:[br]A=Point(-100,-100, is_visible=False)[br]B=Point(100,-100, is_visible=False)[br]background=Polygon(A,B,4,opacity=1,color=[0,0,0])[br][br]#colors:[br]#rgb(216, 211, 205)[br]#rgb(174, 163, 157)[br]#rgb(65, 156, 159)[br]#rgb(75, 83, 96)[br]#rgb(193, 29, 4)[br]#rgb(246, 139, 71)[br][br]#palette:[br]lcol=[[216/255, 211/255, 205/255],[174/255, 163/255, 157/255],[65/255, 156/255, 159/255],[75/255, 83/255, 96/255],[193/255, 29/255, 4/255],[246/255, 139/255, 71/255]][br][br][br]#tichkness:[br]lt =0[br][br]def motif(n,m):[br] for i in range(n):[br] for j in range(m):[br] r=random()[br] col=choice(lcol)[br] if r<0.25 :[br] l=[Point(i,j,is_visible=False),Point(i+1,j,is_visible=False),Point(i+1,j+1,is_visible=False)][br] s=Polygon(Point(i,j,is_visible=False),Point(i+1+1,j,is_visible=False),4,color=col,opacity=random(),line_thickness=lt)[br] col=choice(lcol)[br] l=[Point(-i,j,is_visible=False),Point(-(i+1),j,is_visible=False),Point(-(i+1),j+1,is_visible=False)][br] s=Polygon(Point(-i,j,is_visible=False),Point(-(i+1),j,is_visible=False),4,color=col,opacity=random(),line_thickness=lt)[br] col=choice(lcol)[br] l=[Point(i,-j,is_visible=False),Point(i+1,-j,is_visible=False),Point(i+1,-(j+1),is_visible=False)][br] s=Polygon(Point(i,-j,is_visible=False),Point(i+1,-j,is_visible=False),4,color=col,opacity=random(),line_thickness=lt)[br] col=choice(lcol)[br] l=[Point(-i,-j,is_visible=False),Point(-(i+1),-j,is_visible=False),Point(-(i+1),-(j+1),is_visible=False)][br] s=Polygon(Point(-i,-j,is_visible=False),Point(-(i+1),-j,is_visible=False),4,color=col,opacity=random(),line_thickness=lt)[br] elif r<0.5 :[br] l=[Point(i,j,is_visible=False),Point(i,j+1,is_visible=False),Point(i+1,j,is_visible=False)][br] #s=Polygon(l,color=col,opacity=1,line_thickness=0)[br] c=Circle(Point((2*i+1)/2,(2*j+1)/2,is_visible=False),random()*2,color=col,opacity=random(),line_thickness=lt)[br] col=choice(lcol)[br] l=[Point(-i,j,is_visible=False),Point(-i,j+1,is_visible=False),Point(-(i+1),j,is_visible=False)][br] #s=Polygon(l,color=col,opacity=1,line_thickness=0)[br] c=Circle(Point(-(2*i+1)/2,(2*j+1)/2,is_visible=False),1,color=col,opacity=random(),line_thickness=lt)[br] col=choice(lcol)[br] l=[Point(i,-j,is_visible=False),Point(i,-(j+1),is_visible=False),Point(i+1,-j,is_visible=False)][br] #s=Polygon(l,color=col,opacity=1,line_thickness=0)[br] c=Circle(Point((2*i+1)/2,-(2*j+1)/2,is_visible=False),random(),color=col,opacity=random(),line_thickness=lt)[br] col=choice(lcol)[br] l=[Point(-i,-j,is_visible=False),Point(-i,-(j+1),is_visible=False),Point(-(i+1),-j,is_visible=False)][br] #s=Polygon(l,color=col,opacity=1,line_thickness=0)[br] c=Circle(Point(-(2*i+1)/2,-(2*j+1)/2,is_visible=False),random()*1.5,color=col,opacity=random(),line_thickness=lt)[br] elif r<0.75 :[br] l=[Point(i+1,j,is_visible=False),Point(i+1,j+1,is_visible=False),Point(i,j+1,is_visible=False)][br] s=Polygon(l,color=col,opacity=random(),line_thickness=lt)[br] col=choice(lcol)[br] l=[Point(-(i+1),j,is_visible=False),Point(-(i+1),j+1,is_visible=False),Point(-i,j+1,is_visible=False)][br] s=Polygon(l,color=col,opacity=random(),line_thickness=lt)[br] col=choice(lcol)[br] l=[Point(i+1,-j,is_visible=False),Point(i+1,-(j+1),is_visible=False),Point(i,-(j+1),is_visible=False)][br] s=Polygon(l,color=col,opacity=random(),line_thickness=lt)[br] col=choice(lcol)[br] l=[Point(-(i+1),-j,is_visible=False),Point(-(i+1),-(j+1),is_visible=False),Point(-i,-(j+1),is_visible=False)][br] s=Polygon(l,color=col,opacity=random(),line_thickness=lt)[br] else:[br] l=[Point(i,j,is_visible=False),Point(i,j+1,is_visible=False),Point(i+1,j+1,is_visible=False)][br] s=Polygon(l,color=col,opacity=random(),line_thickness=lt) [br] col=choice(lcol)[br] l=[Point(-i,j,is_visible=False),Point(-i,j+1,is_visible=False),Point(-(i+1),(j+1),is_visible=False)][br] s=Polygon(l,color=col,opacity=random(),line_thickness=lt) [br] col=choice(lcol)[br] l=[Point(i,-j,is_visible=False),Point(i,-(j+1),is_visible=False),Point(i+1,-(j+1),is_visible=False)][br] s=Polygon(l,color=col,opacity=random(),line_thickness=lt)[br] col=choice(lcol)[br] l=[Point(-i,-j,is_visible=False),Point(-i,-(j+1),is_visible=False),Point(-(i+1),-(j+1),is_visible=False)][br] s=Polygon(l,color=col,opacity=random(),line_thickness=lt) [br] time.sleep(0.001)[br] [br]motif(10,7)[br][/code]