int eSize = 40; //オブジェクトのサイズ int speed = 5; //オブジェクトのスピード int x = 0; //オブジェクトのx座標 int y = 0; //オブジェクトのy座標 void setup() { size(400, 400); noStroke(); //輪郭を描かない fill(0); //オブジェクトは黒 } void draw() { background(255); // 軌跡を残す場合は、下の3行をON、backgoundをOFFにする /* fill(255, 50); //透明度のあるrectを描画 rect(0, 0, width, height); fill(0); //オブジェクトは黒 */ for(int i = 0; i <= 100; i = i + 10) { ellipse(mouseX, i, i, i); } ellipse(x, y, eSize, eSize); //円を描く y += speed; //x座標にspeedの値を足す } void mousePressed(){ x = mouseX; y = mouseY; }