import matplotlib.pyplot as plt from PIL import Image #Creation d'une image blanche RGB 10x10 dessin4 = Image.new("RGB",(180,120),(255,255,255)) #Definitions des couleurs rouge = (255, 0, 0) #On parcourt tous les pixels de l'image: for col in range(0, 180): for ligne in range(0, 120): if (col-90)**2 + (ligne-60)**2 < 400: dessin4.putpixel((col, ligne), rouge) plt.imshow(dessin4) plt.show()