Difference between revisions of "Homework2W15"
(→The Project (100 Points)) |
(→The Project (100 Points)) |
||
Line 41: | Line 41: | ||
* Give each line segment physics parameters so they behave as if they were wire segments. (5 points) | * Give each line segment physics parameters so they behave as if they were wire segments. (5 points) | ||
* 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. (10 points) | * 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. (10 points) | ||
− | * 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. | + | * 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. (15 points) |
In the demonstration on the due date demonstrate your application by designing a wire object of a recognizable shape which retains its shape once it hits the floor. | In the demonstration on the due date demonstrate your application by designing a wire object of a recognizable shape which retains its shape once it hits the floor. |
Revision as of 11:44, 23 January 2015
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.
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) 1-2pm 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.
Note that regardless of the device you are using, the task is the same. The Leap is to be used seated, while the Kinect will work better standing up.
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. (5 points)
- Create a cursor. The cursor can be a sphere, cross-hairs, or something similar. (5 points)
- Give visual cues as to where in 3D space the cursor is. This could be done by the cursor's shadow on the ground plane, assuming a directional light source above it, pointed straight down. But there are many other ways, feel free to come up with your own. (10 points)
- 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. You may need to filter the raw data to smooth out noise. (20 points)
- 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. (10 points)
- 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). (5 points for lines, or 10 points for cylinders)
- Give each line segment physics parameters so they behave as if they were wire segments. (5 points)
- 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. (10 points)
- 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. (15 points)
In the demonstration on the due date demonstrate your application by designing a 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 one 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.
- Add an Undo function to undo the last drawing operation. The trick is to figure out an unambiguous gesture for this operation, so that you don't accidentally undo successful lines.
- 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.
- 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.