void setup()
{
size(400,400);
noLoop();
}
void draw()
{
int X1, Y1, X2, Y2;
int Xartis, Yartis;
X1=50; Y1=50;
X2=300; Y2=400;
int[] Xler = new int [10];
int[] Yler = new int [10];
//Xler =array[1,,10] of INTEGER;
ellipse (X1, Y1, 5,5);
ellipse (X2, Y2, 15,15);
Xartis = (abs (X2 - X1)) / 10;
Yartis = (abs (Y2 - Y1)) / 10;
for (int i =0; i < 10; i++)
{
Xler[i] = X1 + Xartis * i;
Yler[i] = Y1 + Yartis * i;
}
for (int k =0; k < 10; k++)
{
ellipse ( Xler[k], Yler[k], 5*k, 5*(k+5));
}
}
Hiç yorum yok:
Yorum Gönder