CodingTrain / CodingTrain/Suggestion-Box
CC - Turn this in to a useful function? looping noise for CC-36
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 570
- Forks
- 85
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.