Alexandre B A Villares 2021-04-10 20:01:07 -03:00
rodzic cc54f8737b
commit c53e8f87a2
3 zmienionych plików z 71 dodań i 0 usunięć

Plik binarny nie jest wyświetlany.

Po

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

Wyświetl plik

@ -0,0 +1,59 @@
def setup():
size(1000, 1000)
# # center
# rectMode(CENTER)
# cols = rows = 4
# w = 150
# for i in range(cols):
# x = w / 2 + i * w
# for j in range(rows):
# y = w / 2 + j * w
# square(x, y, w)
# # corner
# largura_total = 600
# colunas = filas = 4
# largura_celula = largura_total / colunas
# for i in range(colunas):
# x = i * largura_celula
# for j in range(filas):
# y = j * largura_celula
# square(x, y, largura_celula)
# def draw():
# grade(600, 6)
# def grade(largura_total, celulas):
# largura_total = 600
# colunas = filas = celulas
# largura_celula = largura_total / colunas
# for i in range(colunas):
# x = i * largura_celula
# for j in range(filas):
# y = j * largura_celula
# square(x, y, largura_celula)
def draw():
strokeWeight(0.1)
grade(0, 0, width, 5)
noLoop()
saveFrame("a.png")
def grade(xo, yo, largura_total, celulas):
colunas = filas = celulas
largura_celula = float(largura_total) / colunas
for i in range(colunas):
x = xo + i * largura_celula
for j in range(filas):
y = yo + j * largura_celula
if largura_total > 25 and i % 2:
grade(x, y, largura_celula, 5)
else:
fill(0, i * 64, j * 64)
square(x, y, largura_celula)

Wyświetl plik

@ -25,6 +25,18 @@ Here are listed some of the tools I have been using:
---
![sketch_2021_04_10b](2021/sketch_2021_04_10b/sketch_2021_04_10b.png)
[sketch_2021_04_10b](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_04_10b) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2021_04_09](2021/sketch_2021_04_09/sketch_2021_04_09.png)
[sketch_2021_04_09](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_04_09) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2021_04_08](2021/sketch_2021_04_08/sketch_2021_04_08.png)
[sketch_2021_04_08](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_04_08) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]