fractalkitty looking for math? fractalkitty.com

Mathober 2026 ยท day 3, Permutation List

Permutation List

#random#trig#interactive#math#letters#mathober

theWordswhatsBeenUttered


let theWords = ["here","together","all","of","the", "ways"]
let whatsBeenUttered =[["here","together","all","of","the", "ways"]]

function setup() {
	theSizeThatFits = min(windowWidth, windowHeight)*0.9
	theCanvasThatIsFilled=createCanvas(theSizeThatFits, theSizeThatFits);
	background(20,70,80);
	strokeWeight(0.25);
	describe("the words: here togther all of the ways, are written in every permutation on the page in varaitions of teals in a diamondish shape over time. ")
	stroke(255)
	cols = [10,20,30,40,50]
	fill(255)
	noStroke()
	
	
}
function draw() {
	fill(205,235,255,5)
	text(theWords,width/2.8,40)
	thisPhrase = shuffle(theWords)
	c = random(80,200)*abs(sin(whatsBeenUttered.length/100))+50
	fill(c*0.6,c*0.9,c)
	foundAMatch = false;
	for(let i = 0;i<whatsBeenUttered.length;i++){
		 if(JSON.stringify(thisPhrase) === JSON.stringify(whatsBeenUttered[i])){
			 foundAMatch = true;
			 break;
		 }
	}
	if (!foundAMatch){
		push()
				whatsBeenUttered.push([...thisPhrase])
			 text(thisPhrase,width/2.8+width/4*cos(whatsBeenUttered.length)*sin(frameCount/400),width/2+width/2.2*sin(whatsBeenUttered.length)*cos(frameCount/600))
			 pop()
	}
	if(whatsBeenUttered.length===720){
		noLoop()
		
	}
}
function keyPressed(){
	if(keyCode===83){
		save(theCanvasThatIsFilled,"permutation","png")
	}
}