Lecteur YouTube officielSciences et culture
Retour vers l'inversion et première image Ulule - Micmaths
YouTube · publiée le 23 mai 2025
Mickaël Launay (Micmaths)
220 vidéos sur Notavu
On discute de l'inversion et créer la première image de la collection "Images mathématiques" pour vous abonner sur Ulule, c'est par là : https://fr.ulule.com/mickaellaunay/ À suivre le code que nous avons fait. Allez aussi voir dans les commentaires qui proposent des variantes ! import math from PIL import Image width = 2480 height = 3508 C = width/2 R = width/2 echiquier = Image.new('RGB', (width, height), (255,255,0)) for x in range(width): for y in range(height): x0 = x-width/2+0.5 y0 = y-height/2+0.5 f = R**2/(x0**2+y0**2+0.000000000001) x1 = x0*f y1 = y0*f cx = math.floor(x1/C) cy = math.floor(y1/C) color = ((cx+cy)%2)*255 echiquier.putpixel((x,y),(color,color,color)) echiquier.show()
Critiques 0
0 / 5 000



