CS 3744, Final Project - Due May 4, 2010

Interactive Graph Drawing Package

One of the important applications of computer graphics is drawing and computer aided design. You've all probably used such software before (like Paint, Corel, TurboCAD, or Canvas) and are aware of its characteristics without having thought about how such packages are actually implemented. The purpose of this project is to get a better understanding of how transformations are used and to build a small system that allows a user to construct a 2D design from simple graphical primitives. The system to be built is an intelligent graph editing application that enables the design of graph structures with specially designed node icons. Particular emphasis is given to the design of a very easy to use graphical user interface, using the GUI components you have already constructed in OpenGL in earlier assignments. One example of such an application might be jgraph, http://www.jgraph.com.

In this project you must use the work you did for the midterm project, for example, with images or with text, with suitable modifications.

Operations for Drawing Mode

Graph nodes and edges may be added to a drawing by dragging them out of the Object panel. The Object panel contains five elements that are always present plus additional node icons that may be designed with the system and selected as needed. The five permanant elements in the Object panel are icons that represent an edge, a circle, a square, text, and a background image.

A node icon may be added to the drawing by dragging it from the Object panel and moving it into position with the mouse. Any node may be selected with the mouse and scaled up or down in several discrete steps. If a node is moved, all the edges connected to it will be rubber banded dynamically as the node is moved. A selected node may be edited by (1) deleting it, along with any edges that connect to it, (2) replacing it by a different node icon, (3) changing its size, or (4) selecting edge (ie border) and fill colors from a color picker with 8 alternatives.

An edge may be added to the graph by pointing at the nodes it is to connect. A selected edge may be edited by (1) deleting it, (2) adding an arrow in the middle pointing in either direction, (3) removing the arrow, (4) setting the edge thickness, or (5) selecting the edge color. Edges are drawn between the centroids of the nodes they connect, and the nodes should be drawn on top of the edges to which they connect.

A text label may be added to a node by selecting the node and then the text icon in the Object panel. The text element may be scaled upward or downward in several discrete steps and translated. However, it is linked to the node and will move with the node when the node is moved. A selected text element may be edited by (1) deleting it, (2) moving it with the mouse, (3) changing its size, or (4) selecting the text color.

The background image icon permits a user to provide a background for the graph design to be taken from an image file. The user specifies a rectangular area of the screen with the mouse and enters the name and dimensions of a raw format image to be texture mapped into that rectangle. Initially the rectangle should have the same aspect ratio as the source image; several such rectangles may be positioned in the drawing, and they always appear behind the graph itself. A background image may be edited by (1) deleting it, (2) changing its size, or (3) changing its position.

It should be possible to store the current drawing and all node icons in a file and to restore a drawing from a file. A single level of UNDO should be provided to undo the previous operation. It should be possible to pan as required to view the current drawing, which may be larger than the viewing area.

Partners:

The class project may be done jointly with one other class member. In that case, both names must appear in the program headers. To request to work together, submit a collaboration notification form (no Email) in class by Tuesday, April 20.

Submission:

Submit your program by 11:59pm the day it is due. 10% will be deducted from assignments 1 day late, and 50% from assignments 2 days late. Later assignments will not be accepted unless by prior arrangement. Partners should submit only a single copy of the project.

Here are the grading criterea. Note, however, that while ease of use counts only 20%, a poor interface may make it impossible for us to evaluate the functionality thoroughly.

Additional Resources: