(点画圆)
#include<windows.h>
#include <gl\glu.h>
#include <gl\glut.h>
#include<iostream.h>
#include <gl\glaux.h>
int r;//・・・・・・・・・・・・・・・・・・・・・・・・・・定义全局变量
void init (void)
{
glClearColor (1.0, 1.0,1.0, 0.0); // Set display-window color to white.
glMatrixMode (GL_PROJECTION); // Set projection parameters.
gluOrtho2D (-100, 100.0, -100, 100.0);//・・・・・・指定二维平面上的裁剪窗口
}
void drawpixel(int s,int t)
{
glColor3f (0.0, 0.0, 1.0);
glBegin(GL_POINTS);
glVertex2f(s,t);//・・・・・・・・・・・・・・・・・・画坐标为(s,t)的点
glEnd();
glFlush ( );
}
void CirclePoints(int x,int y)//・・・・・・・・・・・・・・・由一个点画其他七个点
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载