- Daily 6 -

Fell behind a couple of days because of work, so let's begin catching up

This is my first take at porting @aqua 's beautiful epitrochoids demo to Shoebot. Original at picardia.co/static/vanitas/

The only goal for now was getting anything on the screen; it's still pretty glitchy, I'll probably keep playing with this more as I try to understand what's going on

· · Web · · ·

source code

from math import sin, cos

lines = True
center = WIDTH * 0.5
theta_count = 5
k = 1

background(0.5)
nofill()
stroke(1)
strokewidth(1)
autoclosepath(False)
speed(60)

def draw():
global lines, radius, center, theta_count, k
if FRAME > 300:
k += 1

td = (300 / (FRAME % 300 + 1)) - 1

if lines:
beginpath()
start = False
for i in range(360 * theta_count):
theta = i / theta_count
# fill(sin(theta) + 1, 1, 0.4)
stroke(sin(theta) + 1, 1, 0.4)
t_r = 1
tr = t_r / k
t_total = t_r + tr + td
rr = t_r * t_scale
r = tr * t_scale
d = td * t_scale
x = (center + (rr+r)*cos(theta) - (d*cos(((rr+r)/r)*theta)))
y = (center + (rr+r)*sin(theta) - (d*sin(((rr+r)/r)*theta)))
if lines:
if not start:
moveto(x, y)
start = True
else:
lineto(x, y)
else:
rect(x, y, 1, 1)
if lines:
endpath()

@rlafuente If it helps you decode what's happening i wrote a desmos graph to explain the maths behind what my vanitas animation was doing
https://www.desmos.com/calculator/evgicaz97q

@aqua This is awesome. One day I will get to grok this, but for now I'm having too much fun just fiddling with numbers and strokes

@rlafuente im envious of all this fun you've been having. i've been tearing my hair out at CSS

@aqua oof :( I hope you can quickly get to the fun part of CSS in whatever you're making. I've been fighting JavaScript in working hours, so number fiddling (and dogfooding this tool) is my evening therapy.

@rlafuente writing this music player, and im a purist so i hate having css rules that dont need to be there. its my own fault really isnt it...

@aqua You're going for the "I did it right" feeling and that's worth the work, no?

And here's my baby

@rlafuente that looks amazing. nice IDE setup

is that Atom?

@aqua yep it's Atom, i made an extension so that i could run Shoebot scripts inside it. The canvas and sliders window is Shoebot being called from inside atom

@rlafuente i use VSCod(ium)
I was gonna recommend a plugin that made writing shaders in GLSL much easier when I was doing that. GLSL canvas. I dunno, maybe there's an Atom one for that when you wanna try it.

@aqua GLSL! There's another toy I'll play with someday. I've had some fun with Hydra, which runs on Atom -- hydra.ojack.xyz/

and btw that audio player looks slick, what are you building? (i see it's a widget on the bottom so i wonder what's going to be in the rest of the page)

A fediverse community for discussions around cultural freedom, experimental, new media art, net and computational culture, and things like that.

<svg xmlns="http://www.w3.org/2000/svg" id="hometownlogo" x="0px" y="0px" viewBox="25 40 50 20" width="100%" height="100%"><g><path d="M55.9,53.9H35.3c-0.7,0-1.3,0.6-1.3,1.3s0.6,1.3,1.3,1.3h20.6c0.7,0,1.3-0.6,1.3-1.3S56.6,53.9,55.9,53.9z"/><path d="M55.9,58.2H35.3c-0.7,0-1.3,0.6-1.3,1.3s0.6,1.3,1.3,1.3h20.6c0.7,0,1.3-0.6,1.3-1.3S56.6,58.2,55.9,58.2z"/><path d="M55.9,62.6H35.3c-0.7,0-1.3,0.6-1.3,1.3s0.6,1.3,1.3,1.3h20.6c0.7,0,1.3-0.6,1.3-1.3S56.6,62.6,55.9,62.6z"/><path d="M64.8,53.9c-0.7,0-1.3,0.6-1.3,1.3v8.8c0,0.7,0.6,1.3,1.3,1.3s1.3-0.6,1.3-1.3v-8.8C66,54.4,65.4,53.9,64.8,53.9z"/><path d="M60.4,53.9c-0.7,0-1.3,0.6-1.3,1.3v8.8c0,0.7,0.6,1.3,1.3,1.3s1.3-0.6,1.3-1.3v-8.8C61.6,54.4,61.1,53.9,60.4,53.9z"/><path d="M63.7,48.3c1.3-0.7,2-2.5,2-5.6c0-3.6-0.9-7.8-3.3-7.8s-3.3,4.2-3.3,7.8c0,3.1,0.7,4.9,2,5.6v2.4c0,0.7,0.6,1.3,1.3,1.3 s1.3-0.6,1.3-1.3V48.3z M62.4,37.8c0.4,0.8,0.8,2.5,0.8,4.9c0,2.5-0.5,3.4-0.8,3.4s-0.8-0.9-0.8-3.4C61.7,40.3,62.1,38.6,62.4,37.8 z"/><path d="M57,42.7c0-0.1-0.1-0.1-0.1-0.2l-3.2-4.1c-0.2-0.3-0.6-0.5-1-0.5h-1.6v-1.9c0-0.7-0.6-1.3-1.3-1.3s-1.3,0.6-1.3,1.3V38 h-3.9h-1.1h-5.2c-0.4,0-0.7,0.2-1,0.5l-3.2,4.1c0,0.1-0.1,0.1-0.1,0.2c0,0-0.1,0.1-0.1,0.1C34,43,34,43.2,34,43.3v7.4 c0,0.7,0.6,1.3,1.3,1.3h5.2h7.4h8c0.7,0,1.3-0.6,1.3-1.3v-7.4c0-0.2,0-0.3-0.1-0.4C57,42.8,57,42.8,57,42.7z M41.7,49.5h-5.2v-4.9 h10.2v4.9H41.7z M48.5,42.1l-1.2-1.6h4.8l1.2,1.6H48.5z M44.1,40.5l1.2,1.6h-7.5l1.2-1.6H44.1z M49.2,44.6h5.5v4.9h-5.5V44.6z"/></g></svg>