int winSize = 400; //ウィンドウのサイズ int centerPoint = winSize/2; //中心点はウィンドウの1/2 float radius = 50; //円の半径 int count = 0; //360度を回転させるためのカウンター void setup() { //画面のサイズを決定 size(400, 400); background(255); } void draw() { //点のアニメーション float rad = radians(count); point(centerPoint + cos(rad)*radius, centerPoint + sin(rad)*radius); count +=2; //角度を2度ずつ増やす if(count >= 360) count = 0; //360度になったら0度に戻す radius += 0.02; //円の半径を0.02ずつ増やす }