Skip to content

Implementation of graphics functions in OpenGL/GLUT. Functions include anti-aliased line drawing, circle drawing, and ellipse drawing, all using a midpoint-based algorithm.

Notifications You must be signed in to change notification settings

JacobGH2/OpenGL_Line_Drawing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Functionality

Project requires GLUT to be installed on the running machine.

  1. Display "wake" line drawing: The left drawing is my own implementation of midpoint-based Gupta-Sproull anti-aliased lines. The right drawing is OpenGL's implementation.

  2. Dynamic line drawing: Left clicking begins a new set of lines. Right clicking will add a new control point.

  3. Circle drawing: Circles are drawn using the midpoint_circle() function. Pressing the c key will switch between dynamic line drawing mode and circle mode. In circle mode, a circle with radius 100 will be drawn around the cursor.

  4. Ellipse drawing: The midpoint_ellipse() function will draw an ellipse with the specified coordinates and radii.

  5. Line styles: Line thickness, stipple pattern, and color are specified as function arguments to GSLine().

About

Implementation of graphics functions in OpenGL/GLUT. Functions include anti-aliased line drawing, circle drawing, and ellipse drawing, all using a midpoint-based algorithm.

Topics

Resources

Stars

Watchers

Forks