Homework 2, CSE 481b, Winter 2006
Due Tuesday, January 17, 6:00 pm
There is nothing inspired about this assignment - however, it will give you a chance to start exploring
the ink structures. You are to write an application that keeps track of the number of strokes, the
total length of strokes, and the number of connected components formed by the strokes. Below is a
screen shot of a sample solution.
- The clear button clears the ink, and resets the counters
- The stroke count gives the number of strokes since the last clear
- The length gives the sum of all of the stroke lengths since the last clear. You should convert the
units so that length is the actual length on the tablet.
- Components is the number of connected components.
- Start with the clear button.
- Add a storke event handler to the ink collector, so you do all your work when a stroke is completed
- You will need to break the stroke into packets to compute it length. You will also need to figure out the
correct normalization factor to use.
- Don't worry about efficiency on connected components unless you care to.
- Methods exist for finding intersections between strokes.
Feel free to extend this. For example, it would be nice to color the connected components with different colors.
There is no requirement to reproduce
the sample solution exactly.
Submission By the deadline, post a screenshot of your application to your project portal.
When you have completed the assignment, send mail to the valentin@cs informing him that the assignment is complete.