This is a initial code,

but it’s loop and loop (a bad code),I’m try to finish it.

```
#include <GL/glut.h>
#include <math.h>
#include <stdlib.h>
#define xpix 500
void init(void)
{
glClearColor(0.0,0.0,0.0,0.0);
gluOrtho2D(0.0,xpix,0.0,xpix);
}
void display(void)
{
int ya=0,yb=10,i,ii,big,arr[xpix];
int add=1;
big=(sqrt(2*yb/10)-sqrt(2*ya/10))*1000;
float x=200,y=490;
glClear(GL_COLOR_BUFFER_BIT);
glPointSize(20);
for (i=0;i<xpix;i++) {
arr[i]=(sqrt(2*(i+1)*10)-sqrt(2*i*10))*500;
}
ii=0;
i=0;
while (1)
{
if (ii<=arr[i]){
ii+=1;
} else {
ii=0;
y-=add;
i+=add;
if (y<10) {add=-1;} else {if (y>490) add=1;}
}
glBegin(GL_POINTS);
glColor3f(0.0,0.0,0.0);
glVertex2f(x,y+10*add);
glColor3f(0.5,0.5,0.0);
glVertex2f(x,y);
glEnd();
glFlush();
}
}
int main(int argc,char *argv[])
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
glutInitWindowSize(xpix,xpix);
glutInitWindowPosition(100,100);
glutCreateWindow("haha");
init();
glutDisplayFunc(display);
glutMainLoop();
return 0;
}
```