Language: C++

//
// Physics Simulator
//まだ途中です！！
//
#include <GL/glut.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <unistd.h>

void Display(void);
void Reshape(int,int);
void Timer(int);

	struct tm *ts;	// Pointer to tm structure
	double ls;
	double cnt=1.0;
	int xs, ys;	// Second Hand Coordinate
	int xm, ym;	// Minute Hand Coordinate
	int xh , yh;	// Second Hand Coordinate
	
	double d,dd=1.57;
	double tt;
	double t=580.0;
	double xc, yc;	// Center Coordinate
	double xd, yd;	// Scale of Panel
	double xd0, yd0;	// Scale0 of Panel
	int ld;		// Radius of Panel
	int ld0;	// Radius of Panel Indicate
	double theta;	// Angle
	int i ;		// Loop Counter

	
int main(int argc, char **argv){
	
	
	
	glutInit(&argc, argv);
	glutInitWindowSize (300, 300);
	glutCreateWindow("Physics Simulator");
	glutDisplayFunc(Display);
	glutReshapeFunc(Reshape);
	glutTimerFunc (500, Timer, 0);
	glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE);
	glClearColor(0.0, 0.0, 1.0, 0.0);

	glutMainLoop();

	return(0);
}


//
// Update Window Display
//
void Display(void){
//*******************************************************
	//Setting
	
	 // Window Title
	glutSetWindowTitle("Physics Simulator");

	// Bachground Paint
	glClearColor(2.0,2.0,2.0,0.0);
	glClear(GL_COLOR_BUFFER_BIT);

//********************************************************
//等速円運動
	
	ls = 120;
	xc = 150;
	yc = 150;
	
	// 軌道	
	glLineWidth(1.5);
	glBegin(GL_LINE_STRIP);
	for (double d = 0.0 ; d < 360.0 ; d+=0.1){
		xd = xc + (ls * sin(d));
		yd = yc - (ls * cos(d));
//
		glColor3ub (0.0 , 0.0, 0.0);
	
		glVertex2d(xd,yd);
		
	}
	glEnd();
	
	//点
	xs = xc + (ls * sin(dd));
	ys = yc - (ls * cos(dd));
	
	glPointSize(10.0);
	glBegin(GL_POINTS);
	glColor3ub (0.0, 0.0, 0.0);
	glVertex2d(xs , ys);
	glEnd();
	
//*******************************************************
//単振動
	
	xc+=250.0;
	
	//点
	glPointSize(10.0);
	glBegin(GL_POINTS);
	glColor3ub (0.0, 0.0, 0.0);
	glVertex2d(xc , ys);
	glEnd();
	
	//線
	glLineWidth(2.0);
	glBegin(GL_LINES);
	glColor3ub (0.0, 0.0, 0.0);
	glVertex2d(xs,ys);
	glVertex2d(xc,ys);
	glEnd();
	
	//縦軸
	glLineWidth(1.5);
	glBegin(GL_LINES);
	glColor3ub (0.0, 0.0, 0.0);
	glVertex2d(xc,15.0);
	glVertex2d(xc,280.0);
	glEnd();
	
//********************************************************	
//カーブ
	xc += 150.0;
	
	//軌道
	tt = 580.0;
	
	glLineWidth(1.5);
	glBegin(GL_LINE_LOOP);
	for (double d = 1.57 ; d >= -4.71 ; d-=0.01){
		
		yd =yc - 120 * cos(d);
		glColor3ub (0.0 , 0.0, 0.0);
		glVertex2d(tt,yd);
		
		tt += 0.5;
	}
	glEnd();
	
	//横軸
	glLineWidth(1.5);
	glBegin(GL_LINES);
	glColor3ub (0.0, 0.0, 0.0);
	glVertex2d(xc,150.0);
	glVertex2d(xc+400.0,150.0);
	glEnd();
	
	//縦軸
	glLineWidth(1.5);
	glBegin(GL_LINES);
	glColor3ub (0.0, 0.0, 0.0);
	glVertex2d(xc+30.0,15.0);
	glVertex2d(xc+30.0,280.0);
	glEnd();

	//点
	glPointSize(10.0);
	glBegin(GL_POINTS);
	glColor3ub (0.0, 0.0, 0.0);
	glVertex2d(t, ys);
	glEnd();
	
	//線
	glLineWidth(2.0);
	glBegin(GL_LINES);
	glColor3ub (0.0, 0.0, 0.0);
	glVertex2d(xs,ys);
	glVertex2d(t,ys);
	glEnd();
	
//*************************************************************
//数値表示


//*************************************************************
	glFlush();
	// Finish
	
	usleep(2500);//滑らかな動きを出す
	
	if((int)(dd*100) == -471){
		t = 580.0;
		dd = 1.57;
	}
	
	
	dd -= 0.01;
	t += 0.5;
	
	glutSwapBuffers();
}


	// Reset Coordinate if occurs Window Resizing
//
void Reshape(int w, int h){
	glViewport(0, 0, w, h);
	glMatrixMode(GL_MODELVIEW) ;
	glLoadIdentity();
	gluOrtho2D(0 , w, 0, h);
	glScaled(1, -1, 1);
	glTranslated(0, -h, 0);
	glutReshapeWindow(1000 , 300); // Window Size Fixing
}

// Timer Interrupt
void Timer(int value){	
	
	glutPostRedisplay();
	glutTimerFunc(500, Timer, value);
}


Compiler output:
a.cc:5:10: fatal error: GL/glut.h: No such file or directory
    5 | #include <GL/glut.h>
      |          ^~~~~~~~~~~
compilation terminated.