Alexandre B A Villares 2021-01-27 22:55:53 -03:00
rodzic 780346fe03
commit 9b29b592e4
3 zmienionych plików z 29 dodań i 0 usunięć

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 261 KiB

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)]