← All projects

33 lines of code

by cino

Minted
86 / 86
Published
2022-09-14

Playback not started.

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/(d
0.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());

Project information
fxhash project ID
19419
Runtime
fxhash snippet · params: no
Network
Tezos
Token contract
KT1U6EHmNxJTkvaWJ4ThczG4FSDaHC21ssvi
Issuer (mint) contract
KT1BJC12dG17CVvPKJ1VYaNnaT5mzfnUTwXv
Artist addresses
tz1gJJrpnVojWj7mZCWRyeqCE6UPBhgFEFbi
Generator URI
ipfs://QmdEhCmaRb4oRWPUVbxgBXyEYGFAvNXgqqXoPCtK3rzbxU
Tags
minimalismp5js
View project on objkt ↗

Related articles

NFTs 86

Ownership snapshot 2026-11-24

Release

Current mint status and pricing are unavailable. Reload to retry.

Primary minting creates a new NFT. This site replays existing NFTs.

Related articles 1

33 lines of code

By cino

"33 lines of code" is my second attempt at what I call minimalist coding: trying to create an interesting generative token with as little code as possible. In this article I explain my script line by line.

Published
2022-09-18
Minted NFTs
263
Index coverage

Last completed index sync: block 15932578 · Mon, 23 Nov 2026 00:50:20 GMT.

Mint history

Supply
86
Indexed NFTs
86
Mint scheduled
2022-09-14T20:20:59.000Z
Primary mints recorded
86
Prices paid at mint
0 tez · 86 priced mints

Market history

Secondary trades
10
Recorded volume
11.838 tez / wXTZ
Lowest latest priced sale
0.8 tez / wXTZ
Last completed sales index sync
fx(params) mint tickets
Block 15946495
fxhash issuer v1 (first)
Block 15946495
fxhash issuer v1
Block 15946495
fxhash issuer v2
Block 15946495
fxhash issuer fx(params)
Block 15946495
fxhash marketplace v2
Block 15946495
fxhash marketplace v1
Block 15946495
objkt.com marketplace v1
Block 15946495
objkt.com English auctions v2
Block 15946495
objkt.com marketplace v2
Block 15946495
objkt.com English auctions v1
Block 15946495
objkt.com marketplace v3.2
Block 15946495
objkt.com collection offers
Block 15946495
objkt.com English auctions v3
Block 15946495
objkt.com marketplace v3.1
Block 15946495
objkt.com Dutch auctions v1
Block 15946495