33 lines of code #23
by cino
Project
A minimalist token I coded as a form of break from the complexity of my next project.
Below you can find the 33 lines of p5.js that generate all the variations of this piece: they may seem more than 33 due to some of them exceeding the page width; zoom out and you'll see that they're really 33 ;)
let h,a;
function setup() {
colorMode(HSB);
randomSeed(fxrand()9999999999999);
createCanvas(min(windowWidth, windowHeight), min(windowWidth, windowHeight));
h = random(0,360);
a = fxrand()<0.5 ? random(0.01,1) : 1;
let mono = fxrand()<0.5 ? false : stro();
let d = random(1,50);
let s = fxrand()<0.5 ? random(15,300) : random(300,1000);
let n = random(0.01,1);
let focus = random(0,width);
for (let y=0; y<height; y+=height/(random(30,s))) {
let sat = random(30,100);
if (!mono) {stro()}
for (let x=0; x< width; x+=width/(random(1,s))) {
let d = dist(x,y,focus,y);
fill(color(h,sat,map(d,0,width/2,0,100),a));
rect(x,y,width,height);
sat = adj(sat,0,5,30,100,false);
}
h = fxrand()<n ? adj(h,-d,d,0,360,false) : h;
focus = adj(focus,-width/(d0.5),width/(d0.5),width0.1,width*0.9,true);
}
fxpreview();
}
adj = (c,d1,d2,start,end,rebound) => {
let ac = c+random(d1,d2);
ac = ac<start ? (rebound ? ac+=d2 : ac+=end-start) : ac;
ac = ac>end ? (rebound ? ac-=d2 : ac-=end-start) : ac;
return ac;
}
stro = () => fxrand()<0.2 ? stroke(h,random(50,100),random(50,100),a) : (fxrand()<0.5 ? stroke(0,a) : noStroke());
Price history
| Date | Event | Price | Market |
|---|---|---|---|
| 2022-09-14 | Mint | 0 tez | fxhash issuer v2 |
Last completed sales index sync
- fx(params) mint tickets
- Block 15289815
- fxhash issuer v1 (first)
- Block 15289815
- fxhash issuer v1
- Block 15289815
- fxhash issuer v2
- Block 15289815
- fxhash issuer fx(params)
- Block 15289815
- fxhash marketplace v2
- Block 15289815
- fxhash marketplace v1
- Block 15289815
- objkt.com marketplace v1
- Block 15289815
- objkt.com English auctions v2
- Block 15289815
- objkt.com marketplace v2
- Block 15289815
- objkt.com English auctions v1
- Block 15289815
- objkt.com marketplace v3.2
- Block 15289815
- objkt.com collection offers
- Block 15289815
- objkt.com English auctions v3
- Block 15289815
- objkt.com marketplace v3.1
- Block 15289815
- objkt.com Dutch auctions v1
- Block 15289815
Traits
Shares describe indexed editions only.- Recorded features
- Not yet indexed