diff --git a/2021/sketch_2021_01_27a/sketch_2021_01_27a.png b/2021/sketch_2021_01_27a/sketch_2021_01_27a.png new file mode 100644 index 00000000..97534d4d Binary files /dev/null and b/2021/sketch_2021_01_27a/sketch_2021_01_27a.png differ diff --git a/2021/sketch_2021_01_27a/sketch_2021_01_27a.pyde b/2021/sketch_2021_01_27a/sketch_2021_01_27a.pyde new file mode 100644 index 00000000..0dd86159 --- /dev/null +++ b/2021/sketch_2021_01_27a/sketch_2021_01_27a.pyde @@ -0,0 +1,23 @@ +from itertools import product, permutations + +BORDER = 100 +SIZE = 60 + +def setup(): + size(500, 740) + background(0) + grid = list(product(range(BORDER, width - BORDER + 1, SIZE), + range(BORDER, height - BORDER + 1, SIZE))) + + perms = list(permutations((0, 64, 128, 128 + 64, 255), 3)) + print(len(perms), len(grid)) + + for i, (x, y) in enumerate(grid): + if i < len(perms): + for j, ca in enumerate(perms[i]): + cb = perms[i][(j + 1) % 3] + for k in range(10): + t = k / 9.0 + cc = lerpColor(ca, cb, t) + fill(cc); noStroke() + circle(x, y, SIZE - k * 2 - j * 20) diff --git a/README.md b/README.md index ecbc51dc..5c82c985 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,12 @@ Here are listed some of the tools I have been using: --- +![sketch_2021_01_27a](2021/sketch_2021_01_27a/sketch_2021_01_27a.png) + +[sketch_2021_01_27a](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_01_27a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)] + +--- + ![sketch_2021_01_26a](2021/sketch_2021_01_26a/sketch_2021_01_26a.gif) [sketch_2021_01_26a](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_01_26a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]