CodingTrain / CodingTrain/Suggestion-Box

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

Đang mở
#246 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
570
Fork
85
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.