String Art (pyggb beta test)

Script:
[code]import time[br][br]dim=10[br][br]# background:[br]A=Point(-dim-2,-dim-2, is_visible=False)[br]B=Point(dim+2,-dim-2, is_visible=False)[br]background=Polygon(A,B,4,opacity=1,color=[0,0,0])[br][br]# fonctions:[br][br]def symaxex(M):[br] P = Point(-M.x,M.y, is_visible=False)[br] return P[br] [br]def symaxey(M):[br] P = Point(M.x,-M.y, is_visible=False)[br] return P[br] [br]def symo(M):[br] P = Point(-M.x,-M.y, is_visible=False)[br] return P[br][br]def astroide(n):[br] for i in range(n):[br] t = i / (n - 1)[br] P1=Point(dim*t,0, is_visible=False)[br] P2=Point(0,dim*(1-t), is_visible=False)[br] Segment(P1, P2,color=[t,0.3,0.7],line_thickness=3)[br] Segment(symaxex(P1), symaxex(P2),color=[t,0.3,0.7],line_thickness=3)[br] Segment(symaxey(P1), symaxey(P2),color=[t,0.3,0.7],line_thickness=3)[br] Segment(symo(P1), symo(P2),color=[t,0.3,0.7],line_thickness=3)[br] time.sleep(0.08)[br][br][br]# pour n=30[br]astroide(30)[br][/code]
Pour tester et modifier le script :
Lien nº1 : [url=https://geogebra.org/python/index.html]https://geogebra.org/python/index.html[/url][br][br]Lien nº2: [url=https://geogebra.github.io/pyggb/]https://geogebra.github.io/pyggb[/url]/

Information: String Art (pyggb beta test)