not good but great

プログラミング、アート、映画・本の感想について書きます。

Processingで折り曲がる布を表現する

・参考
https://processing.org/examples/follow3.html

void drawLine(float x,float y){
  strokeWeight(1.0);
  stroke(150, 100);
  line(x, y, width / 2, height / 2);
}

ほぼサンプルと同じですが、各セグメントから中心へ線を引いているところがポイントです。それにより面が形成され、折り曲がった布のような表現を演出することが出来ます。