EECS 487, Fall 2005

Project 3: Sketch




Overview

In this project you will implement a simple sketch-based modeling system. The basic system supports two kinds of primitives (or basic shapes): boxes and cylinders. Extended versions of the system support additional primitive types such as spheres, ducts, surfaces of revolution, and extruded shapes. Each primitive type is matched to a set of input gestures, which are 2D strokes drawn by the user. The user can thus create a 3D scene interactively by "sketching" various primitives.

In addition to sketching shapes with the left mouse button, the user can move existing shapes around using the middle button. Every shape is given a constraint that limits how the shape moves when grabbed by the user via the middle mouse button. Initially, each object is constrained to move in the plane of the surface on which it was created. The user can interactively define new constraints to move the object in a different plane, or along a given direction. Primitives are organized into a hierarchy via nested transforms. When a new primitive is sketched on top of an existing one, it is added to the scene as a "child" of the existing one, meaning it is defined in the coordinate system of the existing primitive. When the existing one is moved, all of its children automatically move with it. But when a child is moved, it moves independently.

This project is loosely based on the SIGGRAPH 1996 paper: SKETCH: An Interface for Sketching 3D Scenes. (We will see the video in class.)

You are given support code for this project and will need to:
  1. link to the jot library, and
  2. copy the project support code and edit the makefile to indicate jot installation information, and
  3. implement the missing functionality.

Support Code

Copy the project support code to your local machine using one of the following commands:
Remote session for Linux/Unix/SunOS/MacOS users:
  % scp -r red.engin.umich.edu:/afs/engin.umich.edu/class/perm/eecs487/proj3 .

OR

  % rsync -av -e ssh red.engin.umich.edu:/afs/engin.umich.edu/class/perm/eecs487/proj3 .

Windows users can use set up an sftp session to red.engin.umich.edu and grab the files from the above path or, on (CAEN) machines with AFS mount, copy the files from:
    K:\perm\eecs487\proj3

The C++ source code files are: axis.C axis.H floor.C floor.H node.C node.H node_manip.C node_manip.H p3.C sketch_pen.C sketch_pen.H. These provide useful functionality, but not everything is implemented. Read through these files to get familiar with them, then implement the following missing functionality (usually marked by the phrase "YOUR CODE HERE"). You are permitted to modify any of the provided source files as you see fit.

Basic primitives:
Moving objects:
Renderer:
Scene design:
Write-up:
Code quality:
  1. Comment your code reasonably, particularly your design decisions and choice of approach.
  2. Modularize your code: use a suitable number helper functions with descriptive names.
  3. Use descriptive variable and function names: apply a suitable tradeoff between symbol-length and descriptiveness.
    Bottom line: Make your code readable! 10 points


Extended system (up to 15 bonus points):

The following are optional, but can be attempted by ambitious students:

Building and running the code:

Edit the provided Makefile to define the path to your jot directory. [On Windows, you must use a DOS prompt, and you must first run the setup.bat script in your jot directory.] Then you should be able to compile the program, as follows:
  % cd proj3
% make
This results in an executable named p3 which takes model files as command-line arguments. Before running the executable, be sure to define the JOT_ROOT environment variable to specify the path to your root jot directory. E.g.:

    csh or tcsh> setenv JOT_ROOT /afs/engin.umich.edu/class/f05/eecs487/jot
    bash> export JOT_ROOT=/afs/engin.umich.edu/class/f05/eecs487/jot
  DOS> set JOT_ROOT=K:\f05\eecs487\jot

See the phorum post on setting these variables automatically each time you start a shell to avoid having to type these in each time. For windows users, this variable is set as part of the setup.bat file that is in the jot directory.

Handing in

Copy all your project source files (no models, no binaries), and also copies of any images you posted to the phorum, to 
    /afs/engin.umich.edu/class/f05/eecs487/submit/<your-uniqname>/p3/     [Linux users]
       K:\f05\eecs487\submit\<your-uniqname>\p3                                                    [Windows users]

Note: put your files directly into the p3 directory specified above -- do not put them inside a separate sub-directory.

For submission from a remote, non-CAEN machine you can scp or sftp your files to the respective paths on red.engin.umich.edu


Your files should include all of the project 3 source files, whether you modified them or not, and a brief write-up, named writeup.pdf, in PDF format that discusses:
  1. anything about your implementation that is noteworthy, including high-level descriptions of the strategies you used to implement the required functionality, or any extra credit functionality, and
  2. feedback on this assignment, including suggestions for how it should be changed next time.
    Bottom line: typing make on the command line should compile without errors and link to the central JOT installation in

        /afs/engin.umich.edu/class/f05/eecs487/jot
                OR
     K:\f05\eecs487\jot

       
Modify your Makefile accordingly before submission!
        Test the compilation when you submit!



Multiple submissions:
  • You are allowed to overwrite your files in the above directory as many times as you want.
  • If the timestamp on these files is past the deadline your submission will be considered late.
  • Test this submission procedure and please let the GSI know well in advance if you encounter and problems.

Due date

The project is due on November 2, 2005, by 11:59pm. Turning it in 48 hours earlier is worth a 4% bonus; turning it in 24 hours early is worth a 2% bonus.


Last updated: October 26, 2005.