Computer Graphics LAB Programs for 6TH SEM BE

July 20, 2017 | Author: kanth10 | Category: N/A
Share Embed Donate


Short Description

Computer Graphics LAB Programs for 6TH SEM BE VTU...

Description

JSSATE

CSE

10. Program to display a set of values { fij } as a rectangular mesh. #include #include #include #define maxx 20 #define maxy 20 #define dx 25 #define dy 15 GLfloat x0={10.0},y01={50.0}; GLfloat x[maxx]={50.0},y[maxy]={100.0}; void init() { glClearColor(1.0,1.0,1.0,1.0); glColor3f(0.0,0.0,1.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.0,499.0,0.0,499.0); } void display(void) { glClear(GL_COLOR_BUFFER_BIT); GLint i,j; glColor3f(0.7,0.2,0.7); glBegin(GL_LINE_LOOP); for(i=0;i
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF