glut dev c++ membuat nama

6
NAMA : DITA PASKI PRADEVI NPM : 065114112 KELAS : D #include <gl/glut.h> #include <gl/gl.h> #include <math.h> void garis(void) { glClear(GL_COLOR_BUFFER_BIT); glLineWidth(9.0f); glBegin(GL_LINES); glColor3f(4.0f, 4.0f, 4.0f);

Upload: ditta-paski

Post on 12-Apr-2017

323 views

Category:

Engineering


23 download

TRANSCRIPT

Page 1: glut dev c++ membuat nama

NAMA : DITA PASKI PRADEVI

NPM : 065114112

KELAS : D

#include <gl/glut.h>

#include <gl/gl.h>

#include <math.h>

void garis(void)

{

glClear(GL_COLOR_BUFFER_BIT);

glLineWidth(9.0f);

glBegin(GL_LINES);

glColor3f(4.0f, 4.0f, 4.0f);

glVertex3f(-0.940, 0.40, 0.00);

Page 2: glut dev c++ membuat nama

glVertex3f(-0.940, 0.80, 0.00);

glVertex3f(-0.940, 0.80, 0.00);

glVertex3f(-0.850, 0.80, 0.00);

glVertex3f(-0.940, 0.40, 0.00);

glVertex3f(-0.850, 0.40, 0.00);

glVertex3f(-0.850, 0.80, 0.00);

glVertex3f(-0.800, 0.70, 0.00);

glVertex3f(-0.850, 0.40, 0.00);

glVertex3f(-0.800, 0.50, 0.00);

glVertex3f(-0.800, 0.50, 0.00);

glVertex3f(-0.800, 0.70, 0.00);

glVertex3f(-0.750, 0.40, 0.00);

glVertex3f(-0.750, 0.80, 0.00);

glVertex3f(-0.700, 0.80, 0.00);

glVertex3f(-0.500, 0.80, 0.00);

glVertex3f(-0.600, 0.80, 0.00);

glVertex3f(-0.600, 0.40, 0.00);

Page 3: glut dev c++ membuat nama

glVertex3f(-0.500, 0.40, 0.00);

glVertex3f(-0.400, 0.80, 0.00);

glVertex3f(-0.400, 0.80, 0.00);

glVertex3f(-0.300, 0.40, 0.00);

glVertex3f(-0.450, 0.60, 0.00);

glVertex3f(-0.350, 0.60, 0.00);

glVertex3f(-0.200, 0.40, 0.00);

glVertex3f(-0.200, 0.80, 0.00);

glVertex3f(-0.200, 0.80, 0.00);

glVertex3f(-0.130, 0.80, 0.00);

glVertex3f(-0.200, 0.60, 0.00);

glVertex3f(-0.130, 0.60, 0.00);

glVertex3f(-0.130, 0.80, 0.00);

glVertex3f(-0.100, 0.76, 0.00);

glVertex3f(-0.130, 0.60, 0.00);

glVertex3f(-0.100, 0.66, 0.00);

glVertex3f(-0.100, 0.66, 0.00);

glVertex3f(-0.100, 0.76, 0.00);

Page 4: glut dev c++ membuat nama

glVertex3f(-0.080, 0.40, 0.00);

glVertex3f(-0.010, 0.80, 0.00);

glVertex3f(-0.010, 0.80, 0.00);

glVertex3f(0.10, 0.40, 0.00);

glVertex3f(-0.05, 0.60, 0.00);

glVertex3f(0.05, 0.60, 0.00);

glVertex3f(0.15, 0.80, 0.00);

glVertex3f(0.27, 0.80, 0.00);

glVertex3f(0.15, 0.80, 0.00);

glVertex3f(0.15, 0.60, 0.00);

glVertex3f(0.15, 0.60, 0.00);

glVertex3f(0.27, 0.60, 0.00);

glVertex3f(0.27, 0.60, 0.00);

glVertex3f(0.27, 0.40, 0.00);

glVertex3f(0.27, 0.40, 0.00);

glVertex3f(0.15, 0.40, 0.00);

Page 5: glut dev c++ membuat nama

glVertex3f(0.35, 0.80, 0.00);

glVertex3f(0.35, 0.40, 0.00);

glVertex3f(0.49, 0.80, 0.00);

glVertex3f(0.35, 0.55, 0.00);

glVertex3f(0.39, 0.63, 0.00);

glVertex3f(0.49, 0.40, 0.00);

glVertex3f(0.55, 0.80, 0.00);

glVertex3f(0.55, 0.40, 0.00);

glEnd();

glFlush();

}

int main (int argc, char* argv[])

{

glutInit(&argc, argv);

glutInitWindowSize(1000,600);

glutInitDisplayMode(GLUT_SINGLE |GLUT_RGBA);

glutCreateWindow ("membuat nama ");

glutDisplayFunc(garis);

glClearColor(1.0f, 0.0f, 0.0f, 1.0f);

glutMainLoop();

return 0;

Page 6: glut dev c++ membuat nama

}