CodingTrain / CodingTrain/Suggestion-Box

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

未关闭
#246 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
没有语言数据
星标
570
派生
85
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。