aboutsummaryrefslogtreecommitdiff
path: root/j1demo/firmware/mkblob.py
blob: 6623f91f64de7fd9fa0c0ddd72d4a12867a74bd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import Image
import math

im = Image.new("L", (32,32))
radius = 16
for i in range(32):
  for j in range(32):
    x = abs(i - 16)
    y = abs(j - 16)
    d = math.sqrt(x * x + y * y)
    if d < radius:
        t = 1.0 - (d / radius)
        im.putpixel((i, j), int(255 * (t * t)))
im.save("blob.png")