[vtkusers] Stretch/deform surface
Marius Erdt
marius.erdt at gmx.de
Thu Jun 19 12:48:22 EDT 2008
Hi,
I'd like to manually deform a polyData surface, i.e. I set two mouse
positions and I want a part of the surface to be stretched in the
direction given by the vector between the points (just like what is
possible in CAD programs).
I've tried to use the vtkThinPlateSplineTransform on the surface, but
this has a very global effect on the model. That means, the whole
surface is translated in the given direction, instead of just a small
neighborhood. I'm not sure if this is the right approach at all, since
the only parameter to set on the underlying function is the sigma and as
far as I have tried, it does not change much.
Another approach would be to draw a sphere and collect all points of the
surface that lie inside the sphere with vtkSelectEnclosedPoints. As a
result, it is known for every point of the surface whether it lies
inside or outside of the sphere. However, the problem remains how to
apply a transform only on the labeled points. The
vtkWeightedTransformFilter should do something like that, but I'm not
sure how to weight the input transform for the surface points.
Does anyone have an idea what approach seems to be the most promising one?
Thanks for help,
Marius
More information about the vtkusers
mailing list