Wordle
https://scrapbox.io/files/68356899a3b1ba4dd6cfb41e.png
tag explorer
randomized greedy algorithm
emotional fractal
Kinetic Typographyへの応用
例↓
https://x.com/N0i777/status/1929438617291620490
AABBを使ったスパイラル探索配置のコード(TDでの実装)
code:spiral_place.py
table = op('table1')
#交差判定
def is_overlapping(x, y, w, h, placed):
for (px, py, pw, ph) in placed:
if (x < px + pw and x + w > px and
y < py + ph and y + h > py):
return True
return False
#配置
def spiral_place(width, height, placed):
w, h = width, height
a, b = 0, 0.01
theta = 0
while theta < 5000:
r = a + b * theta
x = round(r * math.cos(theta) - w / 2 , 6)
y = round(r * math.sin(theta) - h / 2 , 6)
if not is_overlapping(x, y, w, h, placed):
table.appendRow(x,y,w,h)
return x, y, w, h
theta += 0.1
return None
#ジェネレーティブアート