#include<GL/glu.h>
#include<GL/glut.h>
#include<GL/gl.h>
#include<math.h>
void display()
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0,0.0,0.0);
// glColor3f(1.0,0.0,0.0);
glPointSize(6.0);
//glPointSize(6.0);
int i;
double angle,x,y;
float PI=3.14;
glBegin(GL_LINES);
for(i=0;i<=300;i++)
{
angle=2*PI*i/300;
x=0.5*cos(angle);
y=0.5*sin(angle);
glVertex2d(x,y);
}
glEnd();
glFlush();
}
int main(int argc,char **argv)
{
glutInit(&argc,argv);
glutInitWindowSize(500,500);
glutInitWindowPosition(100,100);
glutInitDisplayMode(GLUT_RGB|GLUT_SINGLE);
glutCreateWindow("Going for a SMILEY :-)");
glutDisplayFunc(display);
glutMainLoop();
}
#include<GL/glut.h>
#include<GL/gl.h>
#include<math.h>
void display()
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0,0.0,0.0);
// glColor3f(1.0,0.0,0.0);
glPointSize(6.0);
//glPointSize(6.0);
int i;
double angle,x,y;
float PI=3.14;
glBegin(GL_LINES);
for(i=0;i<=300;i++)
{
angle=2*PI*i/300;
x=0.5*cos(angle);
y=0.5*sin(angle);
glVertex2d(x,y);
}
glEnd();
glFlush();
}
int main(int argc,char **argv)
{
glutInit(&argc,argv);
glutInitWindowSize(500,500);
glutInitWindowPosition(100,100);
glutInitDisplayMode(GLUT_RGB|GLUT_SINGLE);
glutCreateWindow("Going for a SMILEY :-)");
glutDisplayFunc(display);
glutMainLoop();
}
No comments:
Post a Comment