Git Product home page Git Product logo

cgl-sppu's Introduction

CGL-SPPU

This repository contains the Assignment code of Computer Graphics Assignments of SPPU, Second Year IT Syllabus (2019 pattern)

OS used: Ubuntu

OpenGL installation on Ubuntu:

  1. sudo apt-get update
  2. sudo apt-get install freeglut3
  3. sudo apt-get install freeglut3-dev
  4. sudo apt-get install g++ cmake
  5. sudo apt-get install libglew-dev
  6. sudo apt-get install g++
  7. sudo apt-get install mesa-common-dev
  8. sudo apt-get install build-essential
  9. sudo apt-get install libglew1.5-dev libglm-dev

After your development libraries have been installed to get information about the OpenGL and GLX implementations running on a given X display.

glxinfo | grep OpenGL

To Compile and Execute the C / C++ Program

  1. g++ filename.cpp -lglut -lGL -lGLEW -lGLU -o filename
  2. ./filename

Basic Structure of OpenGL code

	#include<iostream>
	#include<GL/glut.h>
	
	void Draw(){
		glClear(GL_COLOR_BUFFER_BIT);
		
		glPointSize(5);
		
		glBegin(GL_POINTS);
			glVertex2f(0,0);
		glEnd();
		glFlush();
	}
	
	int main(int c, char*V[]) {
		glutInit(&c,V);
		glutInitWindowSize(500,700);	
		glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
		glutCreateWindow("Basic opengl program");
		
		glClearColor(0,0,0,1);	
		glColor3f(1,1,1);
		glutDisplayFunc(Draw);
		glutMainLoop();
		
		return 0;
	} 

CGL

This repository contains the Assignment code of Computer Graphics Lab of SPPU, Second Year IT Syllabus (2019 pattern)


Assignment and Problem Statement


ASSIGNMENT PROBLEM STATEMENT
Assignment 2 Implement DDA and Bresenham line drawing algorithm to draw: i) Simple Line ii) Dotted Line iii) Dashed Line iv) Solid line; using mouse interface Divide the screen in four quadrants with center as (0, 0). The line should work for all the slopes positive as well as negative.
Assignment 3 Implement Bresenham circle drawing algorithm to draw any object.The object should be displayed in all the quadrants with respect to center and radius
Assignment 4 Implement the following polygon filling methods : i) Flood fill / Seed fill ii) Boundary fill ; using mouse click, keyboard interface and menu driven programming
Assignment 5 Implement Cohen Sutherland polygon clipping method to clip the polygon with respect the viewport and window. Use mouse click, keyboard interface
Assignment 6 Implement following 2D transformations on the object with respect to axis i) Scaling ii) Rotation about arbitrary point iii) Reflection
Assignment 7 Generate fractal patterns using i) Koch Curve

cgl-sppu's People

Contributors

khan-mujeeb avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.