int extend = 25;
void setup()
{
background(122,122,122);
size(700,700);
}
void draw()
{
background(122,122,122);
for (int i = 0;i < 25;i++)
{
for (int z = 1;z < 25;z++)
{
if (z > 14)
{
stroke(255,0,0);
strokeWeight(5);
line(0, 300, 625, 300);
text("X",630,300);
}
if (i > 14)
{
stroke(0,255,0);
strokeWeight(5);
line(325, 25, 325,625);
text("Y",325,15);
}
strokeWeight(1);
stroke(0,0,0);
fill(255,255,255);
rect(i*25,z*25,25,25);
}
}
fill(255,255,0);
for (int x=-1000;x<=1000;x+=1)
{
int y=-200 + (x*x)/extend;
rect(x+325,-y+325,5,5);
}
}
void mouseClicked()
{
extend = extend + 10;
}
|