illusion6.py

Created by schraf

Created on August 15, 2022

394 Bytes

Constatez que le trait noir est bien dans le prolongement du trait rouge. Une fois que le rectangle gris est apparu, n’avez-vous pas l’impression que le trait noir est plutôt en face du bleu ??

🖥 Visiter ma chaine Youtube Maths-info

M’offrir un café


from kandinsky import fill_rect
from turtle import *
from time import sleep

COUL = ((0,0,0),(160,3,0),(0,20,167))

def trait(y,c,d):
  pencolor(COUL[c])
  penup()
  goto(0,y)
  pendown()
  fd(d * 160)

while True:
  setheading(-58)
  hideturtle()
  pensize(4)
  for v in ((0,0,-1),(0,1,1),(26,2,1)): trait(*v)
  sleep(3)
  fill_rect(140,0,40,222,(180,)*3)
  sleep(6)
  reset()

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.