Right Blue Cloth.
glassを表現したかったけど、布っぽいな〜〜。
https://such-funiki.com/processing-cloth
void setup(){
smooth();
pixelDensity(2);
size(800, 800);
colorMode(HSB,360,100,100,100);
}
void draw(){
background(0,0,100);
glass();
}
void glass(){
float j=1;
float leftx, lefty, rightx, righty;
float radian=0;
for(float i=0; i<400; i+=0.1){
stroke(200, 70, 95, j*noise(1));
radian=radians(i);
leftx = 20*sin(4*radian/5)+width/4;
lefty = 20*cos(4*radian/5)+3*height/4-i;
rightx = 20*sin(4*radian/5)+3*width/4;
righty = 20*cos(4*radian/5)+3*height/4-i;
beginShape();
vertex(leftx, lefty);
vertex(rightx, righty);
endShape();
j+=0.004;
}
}
void keyPressed(){
if(key == 's'){saveFrame("###.jpg");
}
}
この記事が気に入ったらサポートをしてみませんか?