helvede.net is one of the many independent Mastodon servers you can use to participate in the fediverse.
Velkommen til Helvede, fediversets hotteste instance! Vi er en queerfeministisk server, der shitposter i den 9. cirkel. Welcome to Hell, We’re a DK-based queerfeminist server. Read our server rules!

Server stats:

158
active users

#トゥートProcessing

0 posts0 participants0 posts today

#Processing #Python #py5 #genuary #genuary31 #トゥートProcessing

# iamkate.com/data/12-bit-rainbo
palette = (
'#817', '#a35', '#c66', '#e94',
'#ed0', '#9d5', '#4d8', '#2cb',
'#0bc', '#09c', '#36b', '#639'
)

def setup():
size(800, 800)
no_stroke()
background(0)

def draw():
xc = yc = 400
for i in range(6):
m = 1 - abs(cos(radians(frame_count / 2))) ** 5
r = 150 + 150 * m
a = radians(frame_count / 2 + 60 * i)
x = xc + r * cos(a)
y = yc + r * sin(a)
fill(palette[i])
circle(x, y, 150)
r = 300 - 150 * m
a = a + radians(30)
x = xc + r * cos(a)
y = yc + r * sin(a)
fill(palette[-1 -i])
circle(x, y, 150)

"""
sketch_2022_01_17 #genuary #genuary17 #Python #Processing

Code for #py5 (py5coding.org) imported mode

Recursive grid - I'm always grateful for Takao Shunsuke's inspiration.

#トゥートProcessing #TootProcessing
"""

def setup():
size(1024, 1024)
no_loop()

def draw():
background(0)
grid(0, 0, width, 4)
save_frame('###.png')

def grid(grid_x, grid_y, grid_size, n):
cell_size = grid_size / n
for i in range(n):
x = grid_x + i * cell_size
for j in range(n):
y = grid_y + j * cell_size
if cell_size < 20:
fill(x % 255, 200, y % 255)
circle(x + cell_size / 2,
y + cell_size / 2,
cell_size)
elif n == 1:
fill(0, 0, 200)
square(x, y, cell_size)
else:
next_n = int(random(1, 5))
grid(x, y, cell_size, next_n)

def key_pressed():
redraw()

# Abreviated version from github.com/villares
#トゥートProcessing #py5

from collections import deque
history = deque(maxlen=512)

def setup():
size(600, 400)
no_stroke()
color_mode(HSB)

def draw():
background(51)
for i, (x, y) in enumerate(history):
fill(i / 2, 255, 255, 128)
circle(x, y, 8 + i / 16)
if history:
history.append(history.popleft())

def mouse_dragged():
history.append((mouse_x, mouse_y))

def key_pressed():
history.clear()