Main Page   File List  

vtkNURSubdivisionFilter Documentation

A project for the course Mathematische Methoden der Computergraphik

by Christopher Dräger, Christoph Haider and Ari-Matti Leppänen

1.0

vtkNURSubdivisionFilter is a filter for the VTK-toolkit. It takes a PolyData object as input and processes it with the Non-Uniform Recursive Subdivision Surface or NURSS -scheme and returns the resulting NURSS as PolyData.

The NURSS -sheme was introduced by Sederberd et. al. in the paper "Non-Uniform Recursive Subdivision Surfaces" in 1998. It works in the same way as Doo-Sabin and Catmull-Clark subdivision surfaces, but allows more control by introducing weights or knot-spacings for each edge in the original control mesh. When all weights are set to 1, the resulting surface is the same that would be achived with the Doo-Sabin in a quadratic case and Catmull-Clark in a cubic case. If an edge has a weight less than one, the surface stays closer to the original control mesh. With zero we can actually preserve sharp edges. Weights greater than one push the NURSS further away from the original.

Note thet all pictrures in the following paragraph are copied from the original NURSS paper. The subdivision process first calculates a face point F for each face using equation (11). F is the weighted sum of all the points belonging to the face. Then for each edge an edge point E is calculted using equation (13). The edge point needs to know the F points on each side so they have to be calculated first. A recursive process, which starts from a face, calculates the F for that and the neighbor faces, then calcultes E points around the chosen face and moves on to one of the surrounding faces, could be possible, might be worth trying for these two steps. After these calculations a new vertex point V is calculated for each vertex from the surrounding face points and weighted edge mid-points starting from the point, equation (16). Then new faces are built so that each n-sided old face is split into n four sided faces and new knot-spacings for the resulting edges are set according to figure 10.

Our implementation deals only with the cubic case, so resulting surfaces are quad-meshes and no triangulation is needed before running the PolyData through the filter. In this version we didn't manage to get a vtkWidget to work for picking edges so that knot-spacong could be set by the user. Now some edges have different values. To run the program type in the command prompt 'sub <3DS file> quads' where 3DS file is the name of a 3D Studio file containing the mesh to be subdivided.

Interface:

Standard vtk interface:

  • c / a: toggle between camera and actor modes. In camera mode, mouse events affect the camera position and focal point. In actor mode, mouse events affect the actor that is under the mouse pointer.
  • 3: toggle the render window into and out of stereo mode. By default, red-blue stereo pairs are created. Some systems support Crystal Eyes LCD stereo glasses; you have to invoke SetStereoTypeToCrystalEyes() on the rendering window.
  • e / q: exit the application.
  • f: fly to the picked point
  • r: reset the camera view along the current view direction. Centers the actors and moves the camera so that all actors are visible.
  • s: modify the representation of all actors so that they are surfaces.
  • w: modify the representation of all actors so that they are wireframe.
  • Button 1: rotate the camera around its focal point (if camera mode) or rotate the actor around its origin (if actor mode). The rotation is in the direction defined from the center of the renderer's viewport towards the mouse position. In joystick mode, the magnitude of the rotation is determined by the distance the mouse is from the center of the render window.
  • Button 2: pan the camera (if camera mode) or translate the actor (if actor mode). In joystick mode, the direction of pan or translation is from the center of the viewport towards the mouse position. In trackball mode, the direction of motion is the direction the mouse moves. (Note: with 2-button mice, pan is defined as Shift-Button 1.)
  • Button 3: zoom the camera (if camera mode) or scale the actor (if actor mode). Zoom in/increase scale if the mouse position is in the top half of the viewport; zoom out/decrease scale if the mouse position is in the bottom half. In joystick mode, the amount of zoom is controlled by the distance of the mouse pointer from the horizontal centerline of the window.

    Additional:

  • +: incerease subdivision level by one (maximum level is 5)
  • -: decerease subdivision level by one (minimum level is 0, original)
  • 1: switches to the torus model
  • 2: switches to the cube model
    Generated on Tue Jun 24 10:43:58 2003 for vtkNURSubdivisionFilter by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002