CodingTrain / CodingTrain/Suggestion-Box

CC - Turn this in to a useful function? looping noise for CC-36

Aperta
#246 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Nessun dato sulla lingua
Stelle
570
Fork
85
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

inspired by CC 36 and made up some looping noise code this could also be used to fix the sheering issue you were getting in the flow field CC if you went through the effort of mathematically generating a torus (if you don't mind slight puckering) which isn't too hard I'm just lazy

hope it helps!

P.S. you could use math to dynamically create the circle based on how many segments the user wants and how long they want each segment

`void setup(){
size(500,500);
}
void draw(){
background(0);
fill(0,255,0);
beginShape();
FloatList array=new FloatList();
for (float a = 0; a <= TWO_PI; a += TWO_PI/50) {
float r =10;
float x=r*cos(a);
float y=r*sin(a);
vertex(x+width/2, y+width/2);
array.append(noise((x*.05)+50,(y*.05)+50));
}

//toff++;

endShape();
noStroke();
for(int x=0;x<250;x++){
for(int y=0;y<250;y++){
fill(map(noise((x*.05)+50,(y*.05)+50),0,1,0,255),255/2);
rect(x*2,y*2,2,2);
}
}
stroke(255,0,0);
for(int x=0;x

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.