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).
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:
3. Your menu must include a submenu for rectangles and ellipses (which may be filled or unfilled). This submenu must include:
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.
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:
2. Our program displays the following four sub-menus: "add rectangle", "add ellipse", "add line", and "add bezier curve".
3. If user wants to draw the outline (i.e. unfilled) of a rectangle in orange, our program should display the following:
4. If the user wants to draw a yellow-filled rectangle, our program should display the following:
5. If the user wants to draw an unfilled green ellipse, our program should display the following:
6. If the user wants to draw a filled red ellipse, our program should display the following:
7. If the user wants to draw a purple line, our program should display the following:
8. If the user wants to draw a blue Bezier curve, our program should display the following:
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.
Points will be deducted for any program that does not meet the specification as outlined above.
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.
Fall 2015, CS-116A:
Lectures
Assignments: