Alexandre B A Villares 2019-10-13 23:55:45 -03:00
rodzic 01db5b997f
commit a1ea1ae509
2 zmienionych plików z 23 dodań i 2 usunięć

Wyświetl plik

@ -8,12 +8,11 @@ def setup():
def draw():
background(0)
noFill()
g = list(grid(700, 20, 700, 20))
# println(g)
for _ in range(20):
x, y = choice(g)
stroke(x / 3, y / 3, 255)
fill(x / 3, y / 3, 255, 100)
circle(x, y, 10)
poly_arrow(width / 2, width / 2, x, y)
@ -30,6 +29,8 @@ def poly_arrow(x, y, w, h):
mh = h / 2
pushMatrix() # preserva o sistema de coordenadas atual
translate(x, y) # translada a origem do sistema de coordenadas
r = choice((0, 1, 2, 4))
rotate(r * HALF_PI)
beginShape() # começa a desenhar a forma, inicia um polígono
vertex(0, -0 - mw)
vertex(-mw , 0)
@ -46,3 +47,18 @@ def keyPressed():
if key == 's':
saveFrame("####.png")
redraw()
# print text to add to the project's README.md
def settings():
from os import path
global SKETCH_NAME
SKETCH_NAME = path.basename(sketchPath())
OUTPUT = ".png"
println(
"""
![{0}](2019/{0}/{0}{1})
[{0}](https://github.com/villares/sketch-a-day/tree/master/2019/{0}) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
""".format(SKETCH_NAME, OUTPUT)
)

Wyświetl plik

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