Homework2W15

From Immersive Visualization Lab Wiki
Revision as of 11:47, 17 January 2015 by Jschulze (Talk | contribs)

Jump to: navigation, search

Homework Assignment 2: Wire Sculptures

For this assignment you can obtain 100 points, plus up to 10 points of extra credit.

The goal of this assignment is to create an interactive design tool which uses the Kinect or Leap to design 3D wire sculptures, like those in the pictures below.

Bicycle.jpg Basket.jpg

This assignment is due on Friday, January 30th at 1:00pm.

The assignment should be done in teams of two if at all possible.

There will be a homework discussion session in CSE lab 220 on Wednesday, January 21st from 4-5pm in CSE basement lab 220.

The devices (Kinect and Leap) will be handed out on Tuesday (1/20) after class (3:30-4:30pm) and on Wednesday (1/21) before the homework discussion (3-4pm) in the instructor's office at Atkinson Hall, room 2125.

Each team will get one device of the type they requested. You are welcome to use your own device if you have the option.

Regardless of when you get your device, you should try to start working on the project as soon as you can and use the mouse to draw in the interim.

The Project (100 Points)

Once your application has started up, it should only accept input from the 3D device you are using - no keyboard or mouse commands are allowed (except for debugging).

You will get points for the following things:

  • Create a ground plane in your design space.
  • Create a cursor. The cursor can be a sphere, cross-hairs, or something similar.
  • Control the location of the cursor with your 3D input device. If you use the Kinect, you could map the user's hand location to it, if you use the Leap you could use the user's finger location. The cursor should follow the user's hand/finger in an intuitive way: hand/finger to the right should move the cursor to the right, etc.
  • Come up with a gesture to start and stop creating wire (for example, the vertical location of the other hand/finger of the user could be used for this: hand/finger above a threshold turns wire drawing on, below it turns drawing off. Indicate the drawing state visually, for instance by changing the cursor's color.
  • When in drawing mode: as the cursor moves, it should draw a line. Do this by creating anchor points for the line every so often and draw straight line segments in-between the anchor points.
  • To draw the line segments, you can start by using OpenGL LINE_SEGMENTS just to make it work, but should eventually use thin cylinder segments with low tessellation (in OSG you can use osg::Capsules, they come with nicely rounded ends so that two adjacent segments are connected smoothly).
  • Allow setting a draw color: define another user gesture to put the cursor in color selection mode and use the 3D cursor position to define a color in a 3D color space. You can use RGB for this, but we recommend HSV because it is more intuitive. The selected color should then be the drawing color from that point on.
  • Give each line segment physics parameters so they behave as if they were wire segments.
  • Add snapping: when the user draws a new wire, snap the initial draw point to the closest existing one if there is one within a small range. This will allow "welding" of wires so they don't come apart later.
  • When the user is done drawing there needs to be a way to trigger the physics engine so that the wire object falls to the ground, bounces around a bit like a wire object would and finally comes to a rest.

In the demonstration on the due date demonstrate your application by designing a multi-colored wire object of a recognizable shape which retains its shape once it hits the floor.

Extra Credit (10 Points)

For this project we will give extra credit for functionality which improves the application and involves user interaction. You can choose from the following options, or come up with your own idea which you need to get approved by the TA, tutor or instructor. We might add more options to the list below, so make sure you check back here occasionally.

  • Add an erase function to remove previously drawn parts of the painting (not to be mixed up with an undo function). You can have the user define a 3D box and remove all brush strokes inside it, use some sort of eraser, perhaps a wireframe sphere which deletes all brush strokes it hits, etc.
  • You could treat the brush strokes as if they are made of a solid or rubbery material, give them physics properties, and upon user command start the physics simulation: this would make the brush strokes fall to the ground (you will need a ground plane) and try to maintain their shape, perhaps bounce around a bit as if they were made of wire.