0% found this document useful (0 votes)
4 views2 pages

Computer Graphics Short Summary

The document outlines a curriculum for 2D and 3D graphics programming, detailing figures such as triangles, rectangles, polygons, circles, and 3D shapes like cubes, cylinders, and cones. It includes transformation techniques like scaling, rotation, translation, and reflection, along with code structure for implementing these graphics. Key OpenGL functions and their usage are also specified for creating and manipulating graphical objects.

Uploaded by

jonje2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Computer Graphics Short Summary

The document outlines a curriculum for 2D and 3D graphics programming, detailing figures such as triangles, rectangles, polygons, circles, and 3D shapes like cubes, cylinders, and cones. It includes transformation techniques like scaling, rotation, translation, and reflection, along with code structure for implementing these graphics. Key OpenGL functions and their usage are also specified for creating and manipulating graphical objects.

Uploaded by

jonje2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Curriculum:

2D:
Figures
●​ Triangles : GL_TRIANGLES
●​ Rectangle and Square:
○​ GL_QUADS
○​ GL_POLYGON
●​ Polygon: 3 sides or more
○​ GL_POLYGON
●​ Lines
○​ GL_LINES
●​ Circle
○​ Filled: GL_TRIANGLE_FAN
○​ Line: GL_LINE_LOOP
Transformation
●​ Scaling
○​ glScalef( x-axis , y-axis, z-axis)
●​ Rotation
○​ glRotatef(angle, x-axis, y-axis, z-axis)
■​ For example: rotating around x-axis with an angle 20
●​ glRotatef(20,1,0,0)
●​ Translation:
○​ glTranslatef(x-axis, y-axis, z-axis)
●​ Shearing: Out of scope

Code Structure
1.​ #include
2.​ InitGL() = clear background, determine the orthogonals
3.​ AspectRatio()
4.​ display () = draw figures
5.​ Special keys () = allow user to interact with the drawing through button clicks
6.​ main()

3D
Transformations
●​ Rotation
●​ Scaling
●​ Translation
●​ Shearing
●​ Reflection: glScalef(x-axis, y-axis, z-axis) but
○​ If i want to reflect around x-axis : y-axis value = -1
○​ If i want to reflect around y-axis : x-axis value = -1
Figures
●​ Cube:
○​ 6 squares with different z-axis values
●​ Cylinder
○​ Top circle
○​ Bottom Circle
○​ Tube: unique code
●​ Cone
○​ glutSolidCone(radius of base , height, slices, stacks)

You might also like