| Po Szerokość: | Wysokość: | Rozmiar: 44 KiB | 
| Po Szerokość: | Wysokość: | Rozmiar: 52 KiB | 
| Po Szerokość: | Wysokość: | Rozmiar: 47 KiB | 
| Po Szerokość: | Wysokość: | Rozmiar: 53 KiB | 
| Po Szerokość: | Wysokość: | Rozmiar: 49 KiB | 
| Po Szerokość: | Wysokość: | Rozmiar: 46 KiB | 
| Po Szerokość: | Wysokość: | Rozmiar: 42 KiB | 
|  | @ -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") | ||||
|  |  | |||
|  | @ -20,6 +20,12 @@ You may also support my artistic work, open teaching resources and research with | |||
| 
 | ||||
| --- | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| [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](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)] | ||||
|  |  | |||
 Alexandre B A Villares
						Alexandre B A Villares