kopia lustrzana https://github.com/villares/sketch-a-day
main
rodzic
780346fe03
commit
9b29b592e4
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 261 KiB |
|
@ -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)
|
|
@ -26,6 +26,12 @@ Here are listed some of the tools I have been using:
|
|||
|
||||
---
|
||||
|
||||

|
||||
|
||||
[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](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)]
|
||||
|
|
Ładowanie…
Reference in New Issue