Plotting Over Curves

From ParaQ Wiki
Jump to navigationJump to search

Presentation

The Plot Edges filter sort and order polylines for graph visualization. The filter split and merge any set of polylines to generate a more coherent set of point-ordered smoothed polylines. The points and cells of the output polylines are ordered in order to have an easy to read graph visualization of the point attributes.

  • Ordering

If an input polyline has a set of points like 1,3,5,7,...29,31,30,28...4,2,0, jumps would occurs in the graph. This is why the filter sorts the points along the lines.

Rectangle shaped polyline with points not ordered
Rectangle shaped polyline with points ordered
  • Branching

The previous example was trivial, the input polydata was simple polylines with no branching. In some other cases, input polydata contains loops and branches. The Plot Edges filter tries to overcome the problem by merging the best branches together. It infers that a polyline is smooth and regular: no abrupt change in direction and points spacing is homogeneous. For each nodes in the polydata, a score is computed between the node's polylines. The polylines that make the best pair (highest score) are merged together.

Intersection of polylines. The polylines are inferred to be smoothed and regular.
  • Limitations

The branch merging algorithm may not be optimum for all the cases. Sometimes the choice of merging would require more high-level information.

What should be the result? 1 long polyline or 2 polylines with circle shape?
What should be the result? 1 long polyline or 2 polylines with circle shape?

Suggestion: different merging algorithms can be designed, the user could choose what algorithm would process the best his data...

How to use

The Plot Edge filter can only be connected to 2D lines. The typical workflow would be:

  • Apply the Extract Surface filter to the object
  • Apply the Slice filter (plane cut) to Extract Surface.
  • Apply the Plot Edges filter to Slice.
  • In the Plot Edges Display tab, check the Variable check boxes to visualize the point attributes on the graph.
  • in the 3D view, to colorize the polylines with the arc length values, turn the Plot Edges visiblity on and set the Color by box to "arc_length".

For convenience, a composite filter Plot Edges by Plane intersect has been created to automatically apply the filters Extract Surface, Slice and Plot Edges.

Technical details

The Plot Edges filter accepts 2 types of inputs: a vtkPolyData or a vtkMultiBlockDataSet containing one or more vtkPolyData.
The output generates a vtkMultiBlockDataSet with a vtkPolyData leaf for each polyline.