Alexandre B A Villares 2025-04-16 11:41:39 -03:00
rodzic 059b50e5df
commit 13e98cda8a
3 zmienionych plików z 50 dodań i 0 usunięć

Plik binarny nie jest wyświetlany.

Po

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

Wyświetl plik

@ -0,0 +1,40 @@
import numpy as np
def setup():
size(500, 500)
fill(200, 0, 0)
y = 25
for _ in range(5):
x = 25
for _ in range(5):
circle(x, y, 40)
x = x + 50
y = y + 50
# np.arange would allow non-int steps.
fill(0, 200, 0)
for x in np.arange(25, 250, 50):
for y in np.arange(25, 250, 50):
circle(250 + x, y, 40)
# I like to know the row and column numbers.
fill(0, 0, 200)
for i in range(5):
for j in range(5):
circle(25 + i * 50, 250 + 25 + j * 50, 40)
text_align(CENTER, CENTER)
w = 50
for i in range(5):
x = 250 + w / 2 + i * w
for j in range(5):
y = 250 + w / 2 + j * w
fill(0)
circle(x, y, w - 10)
fill(255)
text(f'{i}, {j}', x, y)
save('out.png')

Wyświetl plik

@ -21,6 +21,16 @@ If you appreciate what I have been doing, you may also support my artistic work,
2025 \| [<b>2024</b>](2024.md) \| [<b>2023</b>](2023.md) \| [<b>2022</b>](2022.md) \| [<b>2021</b>](2021.md) \| [<b>2020</b>](2020.md) \| [<b>2019</b>](2019.md) \| [<b>2018</b>](2018.md)
---
### sketch_2025_04_16
![sketch_2025_04_16](https://raw.githubusercontent.com/villares/sketch-a-day/main/2025/sketch_2025_04_16/sketch_2025_04_16.png)
[sketch_2025_04_16](https://github.com/villares/sketch-a-day/tree/main/2025/sketch_2025_04_16) [[py5](https://py5coding.org/)]
---
### sketch_2025_04_15