Skip to content

huzaifafaruqui/OpenGL

Repository files navigation

OpenGL

OpenGL programs done in lab

1. Draw red color ellipse

IMG

2. Move circle around a line

Circle moves clockwise around a line using right arrow. Logic is simple, at the endpoints of line the velocity direction gets reversed, the y-axis position is also changed by 2 * Radius. Alt Text

3. Move circle with arrow keys

Imgur

4. Zoom in/ out of a circle

I used glScalef function to scale the image Alt Text

5. Dashed line in 3 different colors

We have to enable stippled lines

Imgur

6. Draw free hand line using mouse

I simply store all the points while the LMB is pressed and clear the screen when RMB is pressed. I use small connected line segments (GL_LINE_STRIP) to draw the curves

Imgur

6. Zoom in/ out and rotate a cube

Alt Text

About

OpenGL programs done in lab

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages