![](https://csdnimg.cn/release/download_crawler_static/87019077/bg1.jpg)
#include "stdio。h"
#ifdef __APPLE__
#include 〈GLUT/glut。h〉
#else
#include <GL/glut.h>
#endif
#include 〈stdlib.h>
#include <stdio。h〉
#include <math.h〉
#include 〈windows.h〉
#include 〈time。h〉
static double a=0;
static double b=0.2;
static double t=0;
static double t1=0;
static double v=0;
static double i=0;
static double m=0;
static double n=0;
static double p,q,r,r1=1;
static void resize(int width,int height)//重绘回调函数
{
const float ar=(float)width/(float)height;
glViewport(0,0,width,height);//利用函数 glViewport 定义视区
glMatrixMode(GL_PROJECTION);//投影矩阵
glLoadIdentity();// 重置坐标系统,使投影变换复位
glFrustum(-ar,ar,—1。0,1。0,2。0,100.0);//利用函数 glFrustum 定义修剪区
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
static void display(void)//显示回调
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);//清除颜色缓冲区和深度缓冲区
t=t+t1*0.0001;
glColor3d(1,0。6,0.6);//画图颜色灰红