Henri Poincaré en ASCII (j’ai écrit un script Python pour faire ça).

poincare-ascii

4 comments

  1. taras février 26th, 2014 5:30 Reply
    #1

    Cool. Tu ne veux pas partager le source?

  2. niko février 26th, 2014 9:33 Reply
    #2


    from PIL import Image
    from math import *

    im = Image.open("henri.jpg")
    im.show()

    size = im.size

    step = 4

    for y in range(im.size[1]):
    \t for x in range(im.size[0]):
    \t\t coord = ( x, y )
    \t\t color = im.getpixel(coord)
    \t\t grey = ( ( color[0] / 128 * 128 ) + ( color[1] / 128 * 128 ) + ( color[2] / 128 * 128 ) ) / 3 / 64
    \t\t if ( x % step == 0 and y % step == 0 ):
    \t\t\t print str(grey), ; sys.stdout.softspace=False
    \t if ( y % step == 0 ):
    \t\t print ""

  3. eric février 26th, 2014 1:39 Reply
    #3

    chouette !
    ah la concision du python…

  4. pipoman février 27th, 2014 3:52 Reply
    #4

    Oh: recemment j’ai fait un viewer d’image camera en ascii art pour le voir dans des putty/ssh…

Leave a comment

You must be logged in to post a comment.