CG Exp-7
CG Exp-7
Laldas
SE Computer A
Roll No. 53
Exiperiment No : 07
Aim: Implementation of Koch Curve.
Code:
#include <GL/glut.h>
#include <math.h>
GLfloat oldx=-0.7,oldy=0.5;
void display(){
glClear( GL_COLOR_BUFFER_BIT );
glBegin(GL_LINES);
glColor3f(0.0, 1.0, 0.0);
drawkoch(0.0,0.04,3);
drawkoch(-120.0, 0.04, 3);
drawkoch(120.0,0.04,3);
glEnd();
glFlush();
}
Conclusion:
Hence, we have successfully studied and implemented Koch Curve.