kopia lustrzana https://github.com/villares/sketch-a-day
0202
rodzic
05c2e15518
commit
a4ba177fc6
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 92 KiB |
|
@ -0,0 +1,36 @@
|
|||
from __future__ import division
|
||||
|
||||
N = 10
|
||||
modo_teste = True
|
||||
|
||||
def setup():
|
||||
size(700, 700)
|
||||
rectMode(CENTER)
|
||||
strokeWeight(3)
|
||||
frameRate(10)
|
||||
|
||||
def draw():
|
||||
background(200)
|
||||
translate(width / 2, height / 2)
|
||||
if modo_teste:
|
||||
t = (frameCount % N) / (N + 1)
|
||||
desenho(t)
|
||||
else:
|
||||
scale(.5)
|
||||
for i in range(N):
|
||||
t = i / N
|
||||
rotate(TWO_PI / N)
|
||||
pushMatrix()
|
||||
translate(0, -height * .75)
|
||||
desenho(t)
|
||||
popMatrix()
|
||||
|
||||
def desenho(t):
|
||||
noFill()
|
||||
circle(0, -5 - t * 125, 5 + t * 15)
|
||||
square(0, 0, 10 + t * 250)
|
||||
|
||||
def keyPressed():
|
||||
global modo_teste
|
||||
modo_teste = not modo_teste
|
||||
|
|
@ -26,6 +26,12 @@ Here are listed some of the tools I have been using:
|
|||
|
||||
---
|
||||
|
||||

|
||||
|
||||
[sketch_2021_02_02a](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_02_02a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
[sketch_2021_02_01a_baloes](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_02_01a_baloes) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
|
||||
|
|
Ładowanie…
Reference in New Issue