Programming Project 1
DATE DUE: September 28, 2015
Points possible: 15 points
CS-116A: Introduction to Computer Graphics
Instructor: Rob Bruce

OVERVIEW

For this project, you will be using GLUT along with a point device (mouse) to create a navigation menu for a simple paint-and-draw program. This program may be written in C, C++, or Java and must use the OpenGL Utility Toolkit library (GLUT).

SPECIFICATIONS

1. Your menu must allow selection of one color from a list of at least eight different colors.

2. Your menu must list the following shapes:

  • Line
  • Rectangle
  • Ellipse
  • Bezier curve

3. Your menu must include a submenu for rectangles and ellipses (which may be filled or unfilled). This submenu must include:

  • filled
  • outline

4. Lines and Bezier curves should NOT include a filled / outline submenu. Lines and Bezier curves are never filled and must be drawn one pixel width.

5. You must prompt the user for the choice of color to use when drawing a shape.

EXAMPLE

Here's an example of a mouse-driven menu that conforms to the above specification.

1. User clicks the left mouse button of a multi-button mouse:

Two button computer input device with left button pressed

2. Our program displays the following four sub-menus: "add rectangle", "add ellipse", "add line", and "add bezier curve".

Screen capture visually demonstrating four menu items stacked vertically and labeled "add rectangle", "add ellipse", "add line", "add bezier curve". These are the types of shapes a user may select.

3. If user wants to draw the outline (i.e. unfilled) of a rectangle in orange, our program should display the following:

Screen capture visually demonstrating what happens when user selects option for "add rectangle" followed by option "outline" followed by color "orange." The user has thus indicated they wish to draw an orange colored outline of a rectangle.

4. If the user wants to draw a yellow-filled rectangle, our program should display the following:

Screen capture visually demonstrating what happens when user selects option for "add rectangle" followed by option "filled" followed by color "yellow". The user has thus indicated they wish to draw a solid, filled rectange in the color yellow.

5. If the user wants to draw an unfilled green ellipse, our program should display the following:

Screen capture visually demonstrating what happens when user selects option for "add ellipse" followed by option "outline" followed by color "green." The user has thus indicated they wish to draw a green outline of an ellipse.

6. If the user wants to draw a filled red ellipse, our program should display the following:

Screen capture visually demonstrating what happens when user selects option for "add ellipse" followed by option "filled" followed by color "red." The user has thus indicated they wish to draw a solid, filled ellipse in the color red.

7. If the user wants to draw a purple line, our program should display the following:

Screen capture visually demonstrating what happens when user selects option for "add line" followed by option "purple". The user has thus indicated they wish to draw a purple colored line.

8. If the user wants to draw a blue Bezier curve, our program should display the following:

Screen capture visually demonstrating what happens when user selects option for "add bezier curve" followed by sub-option "blue." The user has thus indicated they wish to draw a blue colored bezier curve.

PLEASE INCLUDE THE FOLLOWING WITH YOUR PROGRAM

1. Please submit your program as a text file labeled "Programming Project 1" to the Canvas dropbox. I only need the source code. I will build the program myself.

2. Please name your programming project file with the following naming convention:

Lastname_Firstname_programming_project_1.c (for C programs)

Lastname_Firstname_programming_project_1.cpp (for C++ programs)

Lastname_Firstname_programming_project_1.java (for Java programs)

For example, my name is Rob Bruce. If I write my program in the C programming language, my programming project 1 should be named: Bruce_Rob_programming_project_1.c

3. Please include your name as a comment at the beginning of your program like this:

/* Rob Bruce */

or this:

// Rob Bruce

4. I usually do not need a makefile to build your programs, regardless of language; however, in the unlikely event that I cannot build your project, I will send an email inquiry as appropriate.

5. I expect your program to build without syntax errors.

6. I expect your program to execute without run-time errors.

GRADING

Points will be deducted for any program that does not meet the specification as outlined above.

LATE ASSIGNMENTS

Assignments submitted after the due date will be worth, at most, 7.5 points. Additional points will be deducted for programs not meeting the specification as outlined above.

Robert Bruce

Contact and Office hours

Education

Research interests


Research

Publications

Graduate supervision

Undergraduate supervision


Courses

Fall 2015, CS-116A:

Greensheet

Lectures

  • Light and Color (part 1 of 2)
  • Light and Color (part 2 of 2)
  • Introduction to OpenGL and GLUT
  • Dissection of OpenGL/GLUT programming examples in C
  • Dissection of OpenGL/GLUT programming examples in Java
  • Splines
  • Meshes: Vertices, Edges, and Faces
  • Camera and clipping plane
  • Linear transformations
  • Interactive program to adjust frustum, near, and far clipping planes
  • Metaballs and Blobbies
  • Graphics File Formats
  • Accelerated Graphics Hardware (GPU)
  • GLSL: OpenGL Shading Language (part 1 of 2)
  • GLSL: OpenGL Shading Language (part 2 of 2)
  • Squash, Stretch, and Bounce: The twelve principles of animation
  • Introduction to Blender
  • Character Rigging for animation
  • Algorithmic animation and modelling (part 1 of 2)
  • Algorithmic animation and modelling (part 2 of 2)
  • Introduction to Computer Vision
  • Introduction to WebGL

Assignments:


Other

Valid XHTML 1.0 Strict Valid CSS!