#include <GL/glut.h>
#include <stdlib.h>
#include <math.h>
#include <iostream.h>
static GLfloat angle = 0.0;
static GLfloat angle1 = 0.0;
static GLfloat angle2 = 0.0;
static GLfloat angle3 = 0.0;
static GLfloat angle4 = 0.0;
GLfloat light_position[] = {0.0, 40.0, 6.0, 1.0};
GLfloat light_color[] = {1.0, 1.0, 1.0, 1.0};
GLfloat ambient_color[] = {0.2, 0.2, 0.2, 1.0};
GLfloat mat_specular[] = {1.0, 1.0, 1.0, 1.0};
GLfloat red[] = {1.0, 0.0, 0.0, 1.0},black[] ={0.0, 0.0, 0.0, 1.0},
silver[] = {0.8, 0.8, 0.8, 1.0};
GLfloat green[] = {0.0, 1.0, 0.0, 1.0},white[] = {1.0, 1.0, 1.0, 1.0},
yellow[] ={1.0, 1.0, 0.0, 1.0};
GLfloat mat_shininess[] = {50.0};
GLUquadric *LV, *RV, *H, *LP, *RP;//left vertical, right vertical, horizontal, left pad, right pad
void myinit(void)
{
//set up overall light data, including specular=ambient=light colors
glClearColor(0.7, 0.7, 0.8, 0.0);
glShadeModel(GL_SMOOTH);
glLightfv(GL_LIGHT
OpenGL绘制可动的椭圆人
最新推荐文章于 2021-11-06 20:15:53 发布