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

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