Computer Science
Burkhard's Lectures: COMPSCI 373 Semester 1, City Campus, 2018
Please see Canvas for lecture notes, schedules and handouts. This web page contains only supplementary material.
This web page has been last updated on the 19th April 2018
Supplementary material for the OpenGL component of CS 373 in 2018
NOTE: All the source code below is copyrighted and free to use for non-commercial purposes. If you use it outside this lecture (e.g. for a research project) please add a note of its origin, e.g. "(c) 2018 Burkhard Wuensche, supplementary CS373 material".
Week 1 (part 1): Overview and Introduction to Graphics Research
- Recomended reading: chapter 1 of the suggested textbook (Hill, F.S., "Computer Graphics using Open GL") and the C/C++ tutorial below.
- Demo programs: same as for part 1 and 2 of the tutorial below
Week 1 (part 2): Introduction to OpenGL
- Recomended reading: chapter 2 and sections 3.1 and 3.2 of the suggested textbook (Hill, F.S., "Computer Graphics using Open GL")
- Demo programs (requires installation of GLUT):
- Example 'OpenGL Examples': Available as Visual Studio solution OpenGLExamples_VS10.zip.
- Example 'House 2D': Available as Visual Studio solution House2D_VS10.zip.
- Example 'GeometricPrimitives': Available as Visual Studio solution GeometricPrimitives_VS10.zip.
Week 2: Illumination and Shading
- Recomended reading: Sections 8.2, 8.3 and 8.6 of the suggested textbook (Hill, F.S., "Computer Graphics using Open GL")
- Demo programs (requires installation of GLUT):
- Example 'Shaded Cylinder & Light Demo': Available as Visual Studio solution ShadedCylinderAndLightDemo_VS10.zip.
- Example 'Light and Shadow': Available as Visual Studio solution LightAndShadows_VS10.zip.
Week 5: Modelling and Rendering of 3D Objects
- Recomended Reading: Section 5.6 and 8.4 of the suggested textbook (Hill, F.S., "Computer Graphics using Open GL")
- Demo programs (requires installation of GLUT):
- Blender is a very popular and powerful modelling and animation tool and using it might give you a better understanding of some of the concepts taught in this lecture. You can download it from here and use these tutorials to get started.
- Example 'Colour Cube + RGB Cube': Available as Visual Studio solution ColourCube_VS10.zip.
Week 6: Modelling with Polygon Meshes
- Reading: Section 3.5 and chapter 6 of the suggested textbook (Hill, F.S., "Computer Graphics using Open GL")
- Extra material: Derivation of the formula for a "Surface of revolution". You get the formula by rotating each curve point using the matrix for a rotation around the z-axis: DerivationSurfaceOfRevolution.pdf.
- Demo programs (requires installation of GLUT):
- Example 'Extruded Surface': Available as Visual Studio solution ExtrudedSurface_VS10.zip.
- Example 'Parametric Curve': Available as Visual Studio solution ParametricCurve_VS10.zip.
- Example 'Parametric Surface': Available as Visual Studio solution ParametricSurface_VS10.zip.
- Example 'Surface of Revolution': Available as Visual Studio solution SurfaceOfRevolution_VS10.zip.
- Example 'Catmull-Rom Surface of Revolution': Available as Visual Studio solution CatmullRomSurfaceOfRevolution_VS10.zip.
Week 11: Ray Tracing
- Reading: Chapter 12 of the suggested textbook (Hill, F.S., "Computer Graphics using Open GL")
Week 12: Texture Mapping
- Reading: Section 8.5 of the suggested textbook (Hill, F.S., "Computer Graphics using Open GL")
- Demo programs (requires installation of GLUT):
- Note that the routine for loading ppm-files is very slow when executed in debug mode. Please compile in release mode.
- Example 'Textured Brickwall': Available as Visual Studio solution TextureMapping_VS10.zip.
- Example 'Wattie Can': Available as Visual Studio solution WattieCanTexture_VS10.zip.
Week 12: Spline Curves and Surfaces
- Reading: Chapter 10 of the suggested textbook (Hill, F.S., "Computer Graphics using Open GL")
- Demo programs (requires installation of GLUT):
- Example 'CurvesAndSurfacesDemo': Available as Visual Studio solution CurvesAndSurfacesDemo_VS10.zip.
- Part 1: If you work in the lab you will use the Visual Studio IDE.
Please read the tutorial "Introduction to .NET" which explains how an OpenGL project is created using MS Visual C/C++. We have two versions:
- IntroductionTo.NET Screenshots created using MS Visual C/C++ 7.0 under .NET 2003.
- Introduction to MS Visual C++ for MSVS2008.pdf Screenshots created using MS Visual C/C++ 2008 under .NET version 3.5.
- Example in section 1.1: Available as source file ass1a.cpp
- Example in section 1.4: Available as .NET solution OpenGLExample_VS10.zip (VisualStudio 10.0).
- Part 2: A basic introduction to C/C++.
- Example for sections 2.2.1-2.2.2: Basic types - Available as .NET solution BasicTypesDemoNET.zip (VisualStudio 7.0).
- Example for sections 2.2.3-2.2.4: Advanced types - Available as .NET solution AdvancedTypesDemoNET.zip (VisualStudio 7.0).
- Example for section 2.3: Operators - Available as .NET solution OperatorDemoNET.zip (VisualStudio 7.0).
- Example for section 2.5-2.6: Arrays, Pointers and Strings - Available as .NET solution ArrayAndPointerDemoNET.zip (VisualStudio 7.0).
- Example for section 2.7: Function definition and declarations, call-by value and call-by-reference - Available as .NET solution FunctionDemoNET.zip (VisualStudio 7.0).
- Example for section 2.7.2: Project with multiple files - Available as .NET solution MultipleFilesDemoNET.zip (VisualStudio 7.0).
- Example for section 2.8.3: File Input/Output - Available as .NET solution FileInOutDemoNET.zip (VisualStudio 7.0).
- Example for section 3: Project with classes - Available as .NET solution ClassDemoNET.zip (VisualStudio 7.0).
A local copy of the installer can be found here: Blender Installer v2.79 [83.8 MByte]. If you use a different system please download the required version from the blender website.
- Microsoft OpenGL/GLU libraries and header files: opengl95.exe
- OpenGL/GLU manual: indexOpenGLManual.html (also available as download GLandGLU_man_pages.zip)
- OpenGL v.1.3 specification: OpenGL_spec_1_3.pdf
- OpenGL Examples (from the OpenGL Programming Guide): Available as .NET solution OpenGL_ExamplesNET.zip, as VS 6.0 workspace OpenGL_ExamplesVS6.zip or as individual source files OpenGL_ExamplesSourceFiles.zip.
- Nate Robin's OpenGL tutorials illustrate important OpenGL concepts (such as transformations, projection and lighting) with example programs
- GLUT libraries and header files (compatible with opengl32 and glu32). Originally written by Mark Kilgard, ported to Win32 (Windows 95,98,Me,NT,2000,XP) by Nate Robins: glut-3_7_6-bin.zip
- GLUT manual (ps-files): indexGLUTManual.html (also available as download GLUT_man_pages.zip)
- GLUT manual: online HTML files at opengl.org web site
- GLUT v.3 specification: glut-3-spec.pdf
- DEC C Language manual (contains all ANSI C constructs and some DEC specific extensions): DEC C Language manual
- ANSI C Standard Library: Available from DEC C documentation or Ross Richardson
- Thinking in C++, Copyright (c) 2000, Bruce Eckel (http://www.BruceEckel.com). The following two links are local copies for use in this class only:
- Some notes for Java programmers who are learning C++
- Some notes comparing C++ and Java (mostly for C++ programmers who are learning Java)
- Website for Python programmers learning C
LaTeX is a useful tool for writing high quality scientific documents. A good introduction is given here. LaTeX comes included in most (all?) UNIX distributions and various free Windows implementations, such as TEXnicCenter, are available. There is also an excellent free online version called Overleaf.
-
Related Programmes