readme + images

main
Alexandre B A Villares 2022-06-05 00:07:16 -03:00
rodzic b158257140
commit ad5c55c8e7
5 zmienionych plików z 74 dodań i 0 usunięć

Plik binarny nie jest wyświetlany.

Po

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

Plik binarny nie jest wyświetlany.

Po

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

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 1.3 MiB

Wyświetl plik

@ -0,0 +1,34 @@
def setup():
global ra, rb, n
size(700, 700)
randomize()
ra, rb, n = next_ra, next_rb, next_n
def randomize():
global next_ra, next_rb, next_n
next_ra = random_int(100, 350) # raio a
next_rb = random_int(100, 350) # raio br
next_n = random_int(3, 13) # n_pointed
def draw():
global ra, rb, n
background(0, 100, 100)
ra = lerp(ra, next_ra, 0.05)
rb = lerp(rb, next_rb, 0.1)
n = round(lerp(n, next_n, 0.6))
#print(n, next_n)
cx, cy = 350, 350
step = TWO_PI / n # passo
begin_shape()
for i in range(n): # for each tip/point
ang = step * i + frame_count / 100.0 # angle
ax = cx + cos(ang) * ra
ay = cy + sin(ang) * ra
vertex(ax, ay)
bx = cx + cos(ang + step / 2.0) * rb
by = cy + sin(ang + step / 2.0) * rb
vertex(bx, by)
end_shape(CLOSE)
def key_pressed():
randomize()

Wyświetl plik

@ -27,6 +27,46 @@ Here are listed some of the tools I have been using:
---
### sketch_2022_06_04
![sketch_2022_06_04](2022/sketch_2022_06_04/sketch_2022_06_04.gif)
[sketch_2022_06_04](https://github.com/villares/sketch-a-day/tree/master/2022/sketch_2022_06_04) [[py5](https://py5.ixora.io/)]
---
### sketch_2022_06_03
![sketch_2022_06_03](2022/sketch_2022_06_03/sketch_2022_06_03.gif)
[sketch_2022_06_03](https://github.com/villares/sketch-a-day/tree/master/2022/sketch_2022_06_03) [[py5](https://py5.ixora.io/)]
---
### sketch_2022_06_02
![sketch_2022_06_02](2022/sketch_2022_06_02/sketch_2022_06_02.png)
[sketch_2022_06_02](https://github.com/villares/sketch-a-day/tree/master/2022/sketch_2022_06_02) [[py5](https://py5.ixora.io/)]
---
### sketch_2022_06_01
![sketch_2022_06_01](2022/sketch_2022_06_01/sketch_2022_06_01.png)
[sketch_2022_06_01](https://github.com/villares/sketch-a-day/tree/master/2022/sketch_2022_06_01) [[py5](https://py5.ixora.io/)]
---
### sketch_2022_05_31
![sketch_2022_05_31](2022/sketch_2022_05_31/sketch_2022_05_31.png)
[sketch_2022_05_31](https://github.com/villares/sketch-a-day/tree/master/2022/sketch_2022_05_31) [[py5](https://py5.ixora.io/)]
---
### sketch_2022_05_30
![sketch_2022_05_30](2022/sketch_2022_05_30/sketch_2022_05_30.png)