home.social

#つぶやきprocessing — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #つぶやきprocessing, aggregated by home.social.

  1. Tiny #p5js Animation
    168 characters

    t=0
    draw=_=>{t+=.01
    createCanvas(w=400,400)
    for(d=0;d++<w;)for(r=0;r++<8;){push()
    translate(d*(4.5+sin(t)*2),r*45)
    rotate(t*(1-r%2*2)+r+d/99)
    rect(-25,-25,50,50)
    pop()}}

    I'm not on twitter any more, but I still like the size restriction. The 500 chars that mastodon gives me is just too much.

    #p5t #つぶやきProcessing

    Edit: reuploading with a vid because gif compression looked nasty. You can play the real thing on the web here: editor.p5js.org/AndyMakes/sket

  2. t=0
    draw=_=>{t+=.003
    createCanvas(w=500,w)
    background('#113')
    c=['#fa5','#ffc','#418','#92b','#f48','#f66']
    h=w/2
    for(d=8;d--;)for(p=0;p<1;p+=.02)line(h+sin(a=p*TAU+t*(3-d/2))*d*30,h+cos(a)*d*30,h+sin(a)*(d+1)*30,h+sin(a)*(d+1)*30,stroke(c[d%6]))
    }//#p5t #つぶやきProcessing

    -----

    Color palette: S-SUNSET7 by ANoob

    lospec.com/palette-list/s-suns

  3. Stress Spiral!
    #p5t #つぶやきProcessing

    Stress Spiral!

    t=0
    draw=_=>{t+=.04
    createCanvas(w=500,w)
    fill('#ff8')
    beginShape(s=99)
    l=Array(s).fill(0)
    for(i=0;i<s*s;i++)l.push(l[i]+60*noise(i/40,sin(t),cos(t))*min(i/s,1))
    strokeWeight(12)
    stroke('#e31')
    for(i=0;i<s*s;i++)vertex(w/2+cos(a=i*(TAU/s)-t)*l[i],w/2+sin(a)*l[i])
    endShape()}

  4. t=0
    draw=_=>{t+=.1
    createCanvas(w=255,w)
    for(k=0;k<2;k++)
    for(p=1;p>0;p-=.02){beginShape(i=1-p)
    for(a=0;a<6.3;a+=.06)vertex(i*(w/2+cos(t+k*PI)*20+cos(a)*20)+p*v(a),i*(w/2+sin(t+k*PI)*20+sin(a)*20)+p*v(a-1.5))
    endShape(noFill(stroke(w*k,0,w-k*w)))}}
    v=a=>min(w,max(0,w/2+cos(a)*w))

    #p5t #つぶやきProcessing #p5js #processing

  5. Interlocking gears and circles in 279 bytes

    t=0
    draw=_=>{createCanvas(w=500,w)
    n=sin
    t+=.03
    for(c=0;c<w;c+=31)for(r=0;r<w;r+=31)if((r+c)%2<1){beginShape(fill(0))
    for(i=0;i<4;i++)for(b=i*PI/2+max(min(n(t+dist(w,w,c,r))*1.5+n(t/2)/2,1),-1)*PI,a=b+3.9;a>b+2.3;a-=.1)vertex(c+cos(b)*32+cos(a)*18,r+n(b)*32+n(a)*18)
    endShape()}}

    #p5js #MastoArt #つぶやきProcessing #p5t

  6. "Under the microscope the sample danced and beckoned. I watched the muscle tighten and release, animated by some unknown force"

    full 279 byte #p5js source below

    #つぶやきProcessing
    #p5t

    t=0
    draw=_=>{d=3+cos(t+=.1)/2
    e=7+sin(t)/2
    n=noise
    createCanvas(w=250,w)
    for(i=0;i<TAU;i+=.01){
    x=n(d,e,i+pow(i,2))*w
    y=n(d+9,e,i*5)*w
    for(k=0;k<30;k++)line(x,y,x=x+cos(a=n(x/99,y/50+d,e)*TAU),y=y+sin(a))
    c=cos(i)
    s=sin(i)
    h=w/2
    line(h+c*99+random(-5,5),h+s*99,h+c*999,h+s*999)}}

  7. // 170 char looping #p5js animation.
    // #p5t #つぶやきProcessing #creativecoding

    t=0
    draw=_=>{t+=.04
    createCanvas(w=300,w)
    fill(0)
    for(c=3,s=10;c<28;c++)for (r=3;r<28;r++)rect(c*s,r*s,p=s*sin(random(PI)+t),p,randomSeed(99+(c+r*30)*(200+sin(t/4)*10)))}