Benz奔驰商标 源代码
来源:互联网 发布:js获取div的name 编辑:程序博客网 时间:2024/04/27 14:46
#include<windows.h>
#include<math.h>
#include <gl/Glut.h>
#include <iostream>
using namespace std;
struct GLPoint{
GLdouble x, y;
};
GLPoint pt[6];
void myDisplay(void);
void myInit(void);
void setWindow(GLdouble left, GLdouble right, GLdouble botton, GLdouble top);
void drawCircle(GLint size, GLint angle);
const GLint screenWidth = 640;
const GLint screenHeight = 640;
const GLdouble PI = 3.1415926;
static GLint size = 300;
int main(int argc, char ** argv){
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
glutInitWindowSize(screenWidth,screenHeight);
glutInitWindowPosition(100,100);
glutCreateWindow("benz");
glutDisplayFunc(myDisplay);
myInit();
glutMainLoop();
return 0;
}
void setWindow(GLdouble left, GLdouble right, GLdouble botton, GLdouble top){
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(left,right,botton,top);
}
void myDisplay(void){
glClear(GL_COLOR_BUFFER_BIT);
setWindow(0.0,(GLdouble)screenWidth,0.0,(GLdouble)screenHeight);
drawCircle(size, 360);
drawCircle(size+10,360);
}
void drawCircle(GLint size,GLint angle){
glBegin(GL_LINE_LOOP);
for(GLdouble i= 0;i< (GLdouble)PI*( angle/180.0 );i=i+0.01){
glVertex2d(size*sin(i)+320,size*cos(i)+320);
}
glEnd();
size -= 10;
for (int i = 0; i< 3; ++i)
{
pt[i].x = size*sin((GLdouble)PI*i*120/180.0)+320;
pt[i].y = size*cos((GLdouble)PI*i*120/180.0)+320;
}
for(int j = 3; j<6; j++){
pt[j].x = 20* sin((GLdouble)PI*((j-3)*120+60)/180.0)+320;
pt[j].y = 20* cos((GLdouble)PI*((j-3)*120+60)/180.0)+320;
}
glBegin(GL_LINE_LOOP);
glVertex2d(pt[0].x,pt[0].y);
glVertex2d(pt[3].x,pt[3].y);
glVertex2d(pt[1].x,pt[1].y);
glVertex2d(pt[4].x,pt[4].y);
glVertex2d(pt[2].x,pt[2].y);
glVertex2d(pt[5].x,pt[5].y);
glEnd();
glFlush();
}
void myInit(void){
glClearColor(1.0,1.0,1.0,0.0);
glColor3f(0.0f, 0.0f, 0.0f);
glLineWidth(2.0);
glPointSize(1.0);
#include<math.h>
#include <gl/Glut.h>
#include <iostream>
using namespace std;
struct GLPoint{
GLdouble x, y;
};
GLPoint pt[6];
void myDisplay(void);
void myInit(void);
void setWindow(GLdouble left, GLdouble right, GLdouble botton, GLdouble top);
void drawCircle(GLint size, GLint angle);
const GLint screenWidth = 640;
const GLint screenHeight = 640;
const GLdouble PI = 3.1415926;
static GLint size = 300;
int main(int argc, char ** argv){
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
glutInitWindowSize(screenWidth,screenHeight);
glutInitWindowPosition(100,100);
glutCreateWindow("benz");
glutDisplayFunc(myDisplay);
myInit();
glutMainLoop();
return 0;
}
void setWindow(GLdouble left, GLdouble right, GLdouble botton, GLdouble top){
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(left,right,botton,top);
}
void myDisplay(void){
glClear(GL_COLOR_BUFFER_BIT);
setWindow(0.0,(GLdouble)screenWidth,0.0,(GLdouble)screenHeight);
drawCircle(size, 360);
drawCircle(size+10,360);
}
void drawCircle(GLint size,GLint angle){
glBegin(GL_LINE_LOOP);
for(GLdouble i= 0;i< (GLdouble)PI*( angle/180.0 );i=i+0.01){
glVertex2d(size*sin(i)+320,size*cos(i)+320);
}
glEnd();
size -= 10;
for (int i = 0; i< 3; ++i)
{
pt[i].x = size*sin((GLdouble)PI*i*120/180.0)+320;
pt[i].y = size*cos((GLdouble)PI*i*120/180.0)+320;
}
for(int j = 3; j<6; j++){
pt[j].x = 20* sin((GLdouble)PI*((j-3)*120+60)/180.0)+320;
pt[j].y = 20* cos((GLdouble)PI*((j-3)*120+60)/180.0)+320;
}
glBegin(GL_LINE_LOOP);
glVertex2d(pt[0].x,pt[0].y);
glVertex2d(pt[3].x,pt[3].y);
glVertex2d(pt[1].x,pt[1].y);
glVertex2d(pt[4].x,pt[4].y);
glVertex2d(pt[2].x,pt[2].y);
glVertex2d(pt[5].x,pt[5].y);
glEnd();
glFlush();
}
void myInit(void){
glClearColor(1.0,1.0,1.0,0.0);
glColor3f(0.0f, 0.0f, 0.0f);
glLineWidth(2.0);
glPointSize(1.0);
}
- Benz奔驰商标 源代码
- BMW BENZ AUDI 宝马,奔驰,奥迪维修标准工时,从KSD,WIS, ELSA 中提取。
- Mercedes Benz star c3
- Mercedes-Benz Axor
- 奔驰扬声器
- 梦想奔驰
- Mercedes Benz SD connector c4
- 心情商标
- 奔驰??内裤???哈哈!!
- [欣赏]未来奔驰?[牛图]
- 奔驰 宝马 拖拉机
- 奔驰也须要勇气
- oj betch与奔驰
- bench与奔驰
- bench与奔驰
- 奔驰工时数据库
- 奔驰车身类型编码
- 奥迪宝马爆奔驰?
- Android实现自适应正方形GridView Read more: http://blog.chengyunfeng.com/?p=465#ixzz2id8EQPMq
- js dns ajax
- [Unity3d]NGUI的INPUT输入框限制中文字节数问题
- ps合并图层
- [设计模式笔记]三. 行为型模式--23. Strategy模式(策略)对象行为型模式(一)
- Benz奔驰商标 源代码
- export mysql data to csv by mysql command
- 字符串处理算法(六)求2个字符串最长公共部分
- 如何打一把好锁
- adb server is out of date. killing...
- vim替换^M字符
- UILable 使用全面解析
- Hashtable ht = new Hashtable()案例
- 介绍一下static、final、abstract 在JAVA语言中的区别