Skip to content

Commit

Permalink
3
Browse files Browse the repository at this point in the history
  • Loading branch information
villares committed Dec 4, 2024
1 parent cf366a2 commit 677eba5
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 19 deletions.
Binary file added 2024/sketch_2024_12_03/sketch_2024_12_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 21 additions & 19 deletions 2024/sketch_2024_12_03/sketch_2024_12_03.py
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
escala_noise = 0.01
escala_noise = 0.02
z = 0
tam = 8
tam = 6

def setup():
size(1200, 600)
no_stroke()

def draw():
background(50, 0, 150)
background(60, 0, 150)
cols = int(width / tam)
rows = int(width / tam)
translate(width / 2, height / 2)
for c in range(cols // 2):
for r in range(rows // 2):
on = os_noise(
n = os_noise(
(mouse_x + c) * escala_noise,
(mouse_y + r) * escala_noise,
z * escala_noise
)
n = 1 + sin(on * 3)
#n = (((nn + 1) * 2) % 2) / 2 - 1
if n > 0.02:
d = tam - tam * n
else:
d = max(0, tam - tam * abs(10 * n))
fill(240, 240, 100, 200)
circle(tam / 2 + c * tam,
tam / 2 + r * tam, d)
circle(-tam / 2 - c * tam,
tam / 2 + r * tam, d)
circle(-tam / 2 - c * tam,
-tam / 2 - r * tam, d)
circle(tam / 2 + c * tam,
-tam / 2 -r * tam, d)

f = 1.2
d = (tam * f - abs(sin(-1 + n * PI)) * tam)
if n > 0.1:
fill(240, 240, 100)
else:
fill(20, 0, 100)
#fill(200, 0, 0, 100)
# d = max(0, tam - tam * abs(10 * n)) * f
circle(tam / 2 + c * tam,
tam / 2 + r * tam, d)
circle(-tam / 2 - c * tam,
tam / 2 + r * tam, d)
circle(-tam / 2 - c * tam,
-tam / 2 - r * tam, d)
circle(tam / 2 + c * tam,
-tam / 2 -r * tam, d)

def key_pressed():
global z
if key_code == UP:
Expand Down
10 changes: 10 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ Here are listed some of the tools I have been using more recently:
2024 \| [<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_2024_12_03

![sketch_2024_12_03](https://raw.githubusercontent.com/villares/sketch-a-day/main/2024/sketch_2024_12_03/sketch_2024_12_03.png)

[sketch_2024_12_03](https://github.com/villares/sketch-a-day/tree/main/2024/sketch_2024_12_03) [[py5](https://py5coding.org/)]



---

### sketch_2024_12_02
Expand Down

0 comments on commit 677eba5

Please sign in to comment.