Alexandre B A Villares 2019-10-06 20:14:53 -03:00
rodzic 2fc1e43379
commit 02057af6c0
9 zmienionych plików z 13 dodań i 10 usunięć

Plik binarny nie jest wyświetlany.

Po

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

Plik binarny nie jest wyświetlany.

Po

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

Plik binarny nie jest wyświetlany.

Po

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

Plik binarny nie jest wyświetlany.

Po

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

Plik binarny nie jest wyświetlany.

Po

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

Plik binarny nie jest wyświetlany.

Po

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

Plik binarny nie jest wyświetlany.

Po

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

Wyświetl plik

@ -9,25 +9,23 @@ def setup():
def draw():
background(0)
noFill()
# c, r = 11 + int(10 * sin(frameCount/5.)), 11 + int(10 * cos(frameCount/5.))
# print(c, r)
g = list(grid(600, 20, 600, 20))
for _ in range(50):
g = list(grid(700, 20, 700, 20))
# println(g)
for _ in range(20):
x, y = choice(g)
stroke(x / 3, y / 3, 255)
circle(x, y, 10)
poly_arrow(width / 2, width / 2, x, y)
def grid(w, cols, h, rows):
cw = w / cols
rh = h / rows
for x in range(cw / 2, w + cw, cw):
for y in range(rh / 2, h + rh, rh):
for x in range(cw / 2, w, cw):
for y in range(rh / 2, h , rh):
yield x, y
def poly_arrow(x, y, w, h):
""" Casinha na posição x, y com largura e altura 'tamanho' """
""" Seta na posição x, y com largura w e altura h"""
mw = w / 2
mh = h / 2
pushMatrix() # preserva o sistema de coordenadas atual
@ -44,7 +42,6 @@ def poly_arrow(x, y, w, h):
popMatrix() # retorna o sistema de coordenadas anterior
def keyPressed():
if key == 's':
saveFrame("####.png")

Wyświetl plik

@ -20,6 +20,12 @@ You may also support my artistic work, open teaching resources and research with
---
![sketch_191006b](2019/sketch_191006b/sketch_191006b.png)
[sketch_191006b](https://github.com/villares/sketch-a-day/tree/master/2019/sketch_191006b) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_191005a](2019/sketch_191005a/sketch_191005a.png)
[sketch_191005a](https://github.com/villares/sketch-a-day/tree/master/2019/sketch_191005a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]