# CS340-s17

From MCIS Wiki

## Contents

## Computer Graphics

This course will cover a variety of graphics-related topics, including

- Graphics Systems and Models
- Graphics Programming
- Geometric Models
- Viewing
- Computer Vision
- Light, shading and materials

Programming will be in Python (OpenGL, OpenCV) and some C# (when using Unity).

There will be individual assignments, group projects, presentations, and quizzes.

Text:

- Recommended: OpenGL Programming Guide A.K.A. "The Red Book"
- OpenGL documentation
- Qt5 documentation
- PyQt5 documentation

### Calendar

### Assignments

- Drawing Bezier Curves (Due Jan 20)
- Drawing B-Splines (Due Feb 3)
- Spline Art (Due Feb 13)
- Wireframe Transformations (Due Feb 20)
- Basic Ray Tracing (Due Feb 27)
- Advanced Ray Tracing (Due March 7)
- Rasterization (Due March 30)

### CAGD (Computer Aided Geometric Design

Readings:

- Jan 13: Sections 1, 2, 7, 8, 9
- Feb 1: https://en.wikipedia.org/wiki/Transformation_matrix - not the greatest reading!

### Ray Tracing

- http://en.wikipedia.org/wiki/Ray_tracing
- http://www.cs.unc.edu/~rademach/xroads-RT/RTarticle.html formula for intersection of a ray and a sphere
- http://www.siggraph.org/education/materials/HyperGraph/raytrace/rtrace0.htm

### Basic OpenGL Programming

My install of OpenGL:

Start with Anaconda (https://www.continuum.io/downloads) - I used the 2.7 version

Install of PyOpenGL:

conda install -c anaconda pyopengl=3.1.1a1

Install of pygame:

conda install -c cogsci pygame=1.9.2a0

I was able to get the following demo to run: https://pythonprogramming.net/opengl-rotating-cube-example-pyopengl-tutorial/

I'm unsure when we'll have this available on the campus image.

### Basic pygame Programming

Documentation: http://www.pygame.org/lofi.html

Here is a Sample pygame Project