Programming Assignment 2

Yiming Liu (yimingl@princeton.edu)

Oct 29


Circular Region of Interest

I design an interactive user interface to allow users select circular region of interest. When my program capture that a user click on a vertex while pressing SHIFT key, it will treat that vertex as a anchor with a circular ROI. The initial radius of the ROI, is the 1.5 times the average length of edges from the anchor. Then users can use mouse wheels to adjust the radius. Wheeling up means radius *= 1.2, and wheeling down means radius /= 1.2. The circular ROI are displayed as colored vertices, and their colors reflect their distances from the anchor point (green means 0 distance, and red color means distance equal to radius).

To implement this interface, I use a priority queue. In each iteration, it pops one vertex which has not been expanded and has the shortest distance to the anchor point. If its distance to anchor is less than radius, then it is used to update the shortest distance records of all its neighbors, otherwise the loop terminates. When the loop terminates, all expanded vertices make the ROI. Also, all remaining vertices in the priority queue, and their 4-ring neighbors are used to define the boundary of the ROI.


Bunny

Now I am demonstrating how to use my circular ROI feature for bunny mesh.

First, click on one vertex while pressing the SHIFT key:


Zoom in, and scroll the mouse wheel up and down while pressing SHIFT:


Now I think the destination of the anchor point is not satisfying, so I use mouse to drag it to a proper position (remember to keep SHIFT key down):


Now we press SPACEBAR, and see the result:



Dragon

Here is a brief procedure to modify the mouth of the dargon mesh. You can observe that the dragon's eyes are not deformed because it is on the boundary of ROI (which is fixed at its original position) or outside the ROI.