リングの上で回転する線がつくるパターン #1
patterns by lines on ring #1 - OpenProcessing
/** * patterns by lines on ring #1 * * @author aa_debdeb * @date 2016/11/10 */ float radius = 150; float bar = 150; int step = 0; void setup(){ size(640, 640); stroke(20); } void draw(){ background(235); translate(width / 2, height / 2); for(float angle = 0; angle < 360; angle += 1){ float radian = radians(angle); pushMatrix(); translate(radius * cos(radian), radius * sin(radian)); rotate(radian + radian * step * 0.5 + frameCount * 0.03); line(-bar / 2, 0, bar / 2, 0); popMatrix(); } } void mousePressed(){ step++; if(step > 20){ step = 0; } }