messy source code

i'm sorry, this is really bad atm!

size(548, 548)
speed(30)
rectmode(CENTER)
background("")

rsz = 30
cols = 16
rows = 16

class LilSquare:
def __init__(self, step=3, sz=rsz, offset=0.5, gap=2):
self.step = step
self.size = sz
self.offset = offset
self.flipped = False
self.gap = gap
self.frontcolor = "#283618"
self.backcolor = ""
self.stepamount = self.offset

def next(self):
if self.step >= self.size:
self.stepamount = -self.offset
elif self.step <= 1:
self.stepamount = self.offset
self.flipped = not self.flipped
self.step += self.stepamount

def draw(self, x, y):
col = self.backcolor if self.flipped else self.frontcolor
rect(x, y, self.step-self.gap/2, self.size-self.gap/2, fill=col)

lilsquares = [[LilSquare(step=x%3+y%2, offset=(y+1)%4+0.2) for y in range(rows)] for x in range(cols)]

def draw():
global lilsquares
translate(50, 50)

firstlsq = lilsquares[0][6]

for x,y in grid(cols, rows, rsz, rsz):
tx, ty = (int(x/rsz), int(y/rsz))
lsq = lilsquares[tx][ty]
lsq.next()
lsq.draw(x,y)

- Daily 8 -

I spent more time than would be reasonable to implement squares that flip. First I tried to avoid saving their states, but got fed up and just did things with a class. Still grumpy that I couldn't find a nicer way.

Next time I'll see if trig motion makes this less monotonous

- Daily 7 -

Going deeper into @aqua 's epitrochoids and playing with numbers until something nice appears.

One happy discovery -- this particle-like effect is actually a dashed stroke which happens to move nicely as the paths shift shapes. Reminds me of Processing particle examples (and using dashes speeds up rendering considerably)

source code

from math import sin, cos

lines = True
radius = WIDTH * 0.45
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
t_scale = radius / t_total
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()

- 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

Straight from the birdsite: Cool data embedded in the Bitcoin blockchain

cirosantilli.com/cool-data-emb

source code

margin = 60
spacing = 40
swidth = 20
colors = ["fec5bb","fcd5ce","fae1dd","f8edeb","e8e8e4",
"d8e2dc","ece4db","ffe5d9","ffd7ba","fec89a"]

size(548,548)
background(1)
nofill()
autoclosepath(False)
strokewidth(swidth)
stroke(0.2)
strokecap(ROUND)
speed(60)

def draw():
for n in range(2,12):
arc(margin, HEIGHT-margin, n*spacing, -90, 0,
stroke=colors[n%len(colors)],
strokedash=[50, 25, 100, 25], dashoffset=n*20+FRAME*1.5)

for n in range(1,12):
arc(WIDTH-margin, margin, n*spacing, 90, 180,
stroke=list(reversed(colors))[n%len(colors)], blendmode='multiply',
strokedash=[50, 25, 100, 25], dashoffset=-n*20-FRAME*1.5)

- Daily 5 -

Showing off blending modes because I love this feature

- Daily 4 -

we're seeing a pattern here

- Daily 3 -

Started as an experiment with moirés, but got distracted with stroke dashes again

Arf, I posted an earlier version which actually demonstrated a glitch with the stroke miters (see how they snap right after the shape starts drawing), now this is the right one.

Code:

size(548,548)
background(0.8)
stroke(0.5)
strokewidth(2)
strokejoin(BEVEL)
speed(30)

def draw():
for n in range(10):
angle1 = FRAME/2
if angle1 % 360 == 0:
print(f"Reached loop frame: {FRAME}")
angle2 = FRAME*5 % 360
arc(WIDTH/2, HEIGHT/2, n*25, angle1, angle2)

This was also an attempt at figuring out how to make a decently-looped animation.

1. determine at which point you want the video to stop -- in this case, when the slower moving arc extreme reaches zero degrees
2. add an if-condition that, when met, prints the value of FRAME; and now you have the number of frames to output
3. "sbot-export-video arcs.bot --framenumber <frames> arcs.mp4" and you're done

- Daily 2 -

I used to find this "chord arc" a pretty dull shape because I was only looking at single static examples. When combined or animated, they get interesting really quick.

(didn't feel an urge to explore color -- it's gray on gray and i call it a day)

EU Digital COVID Certificates: When governments move fast and break things
https://github.com/ehn-digital-green-development/hcert-spec/issues/84

@rlafuente oh and if you want a nice collection afterwards, consider using a relatively unique hashtag as mastodon creates pages like these: post.lurk.org/tags/LURKbirthda

Note to properly size the next one: video previews on Mastodon have a width of 548px

So in June I'm trying my first thing-a-day-for-a-month project.

I'll be posting experiments made with , a tool that i've been making with friends for the last 13 years, to draw with vector graphics in a simple drawing syntax.

First off, an output of some recent fun animating stroke dashes -- increasing their offset results in a pleasing smooth motion. This one is made out of 3 100-sided stars with varying dashed strokes.

@lgm #Hackers, "enjoy your weirdness"!
The User Interfaces of Free Software as an alternative concept to the monoculture of interface designs from #Cupertino, that are aiming on efficiency for #capitalism purposes, reinforcing the hegemony of white men and symbolizing suppression of #diversity. Still I'm processing the deeper meanings of this eye opening lecture.

Thank you so much Brendan Howell!

If vector graphics, python, creative coding and/or pen plotters ring a bell, my LGM short talk presenting the new release will probably be of interest to you! In around 30 minutes: libregraphicsmeeting.org/2021/

Hi Fediverse, do you have a clue about controlling a GSM modem with Python?

What we're looking for:
- make automated phone calls and play some audio
- keep it free and private, so no Twilio or other SDKs
- a dongle or USB modem would be nicer than Arduino/RPi with modules, but those are ok if there's no alternative

Wondering if there's prior art around here?