arkivo.art

Genuary 2023 Day 21 - Persian Rug

Carson

-- genuary #21 2023 -- persian rug -- by carson kompon -- huge thanks to piter pasma's explanation video function dist(x,y) return sqrt((x*x+y*y)) end function edge(x,y) if x>0 and y>0 then return dist(x,y) elseif x>y then return x end return y end function sdf_rect(x,y,cx,cy,w,h) x-=cx y-=cy return edge(abs(x)-w,abs(y)-h) end function sdf_circle(x,y,cx,cy,r) x-=cx y-=cy return dist(x,y) - r end function sdf(x,y) dd = 1.5 circle = sdf_circle(x,y,cos(t()/4+.5)/dd,sin(t()/16+.5)/dd,.001) circle = (abs(circle)-.1)*1.2 box = sdf_rect(x,y,0,0,.9,.75) return max(-circle,box) end pal({[0]=0,128,133,141,133,0,0,0,12,140,1,129,130,132,9,10},1) ::_:: x=rnd(2)-1 y=rnd(2)-1 d=sdf(x,y) c=0 if(d<0)c=d*16 circfill((x+1)*64,(y+1)*64,1,c) goto _

Blockchain tezos
Smart Contract KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton
Platform HEN
Token ID 807970
Minted at 22 Jan 2023, 00:46 UTC

Metadata URI Metadata URI
Artifact URI Artifact URI

creativecoding , animated , sdf , pixelart , opensource , genuary , pico8 , pico-8 , cc0 , genuary21

JavaScript true
Networked false

Timestamp (UTC) 2024-08-18T00:18:32.734Z
Snapshot version 1
External network calls 0
Download Snapshot Download
Snapshot Image