Des motifs de Truchet "cercles" point par point #pyggb

[url=https://www.geogebra.org/python/index.html?name=cercles+truchet&code=eJy9UkFrgzAYvQv%2Bh9BT1NSp7FTIoT3svPsYI9rYfhATScJW%2F%2F2Saqd2FsYo%2FRQS3%2Fv4Xt4z0LRKW2Sh4WEQBrVWDdJM7t3SU%2FEANsweR0hWiKIicxsxbPyzdftXBdLidUHcC%2BbjEwyUgtMXJgyPwmD30yKr5FZTreT%2B3Ce6g5J4S3bkeYDTSgml6errCJavBky1rALb0fxsQWlUIpDexoHjjEhBimgTBsiVJ9mMrEbSl0bU2%2FcHzB0zElAjTZ3VSe9lIEwH5vl03KVO1EV0DXZLYB%2FOKamUwRC38ISLOM%2BiKGGkSwzIOViSPo83Vhp8zUbEHed94mGuUawXZLyOI35L%2FVfL36zUCM5bnKVZlk9auPvbG7c%2BJNGbbu%2Bf6rLUI5P19fevORIG37xg9WY%3D&autorun=false]LINK / LIEN / ENLACE [/url]
import time[br][br]from random import*[br]from math import*[br]nc = 20[br]nl = 20[br][br][br]A = Point(-2,-2,is_visible=False)[br]B = Point(nc+2,-2,is_visible=False)[br]fond = Polygon(A,B,4)[br]fond.color="white"[br]fond.opacity=1[br][br]for b in range(0,nl,2):[br] for a in range(0,nc,2):[br] r =randint(1,2)[br] if r== 2:[br] for i in range(0,11):[br] x=0[br] y=0[br] Point(x+cos(i*pi/(2*10))+a,y+sin(i*pi/(2*10))+b,color=[abs(sin(i*pi/(2*10))),0,1])[br] Point(2-(x+cos(i*pi/(2*10)))+a,2-(y+sin(i*pi/(2*10)))+b,color=[abs(sin(i*pi/(2*10))),0,1])[br] time.sleep(0.001)[br] else: [br] for i in range(0,11):[br] x=0[br] y=0[br] Point(2-(x+cos(i*pi/(2*10)))+a,y+sin(i*pi/(2*10))+b,color=[abs(sin(i*pi/(2*10))),0,1])[br] Point(2-(2-(x+cos(i*pi/(2*10))))+a,2-(y+sin(i*pi/(2*10)))+b,color=[abs(sin(i*pi/(2*10))),0,1])[br] time.sleep(0.001)

Information: Des motifs de Truchet "cercles" point par point #pyggb