[vtkusers] Curvatures of a space curve?

philipp.batchelor at kcl.ac.uk philipp.batchelor at kcl.ac.uk
Tue May 13 12:40:33 EDT 2003


vtkCurvatures is indeed a PolyDataFilter, and assumes the  PolyDatas
as surfaces. Funny you ask that as I have been recently been working on 3D
curves. I had thought of writing something for VTK, but in the end
couldn't really decide what class should represent curves, and thus what
filter to inherit from. The curvatures of a curve can be estimated by:
I think polyline is the object, a crude pseudocode for a discrete
curvature/torsion/Frenet frame computation would be:

If the points of the polyline are x[k]
ds[k] = length(x[k+1]-x[k])
T[k] = (x[k+1]-x[k]) / ds[k]
B[k] = cross(T[k],T[k+1]) // Vector product
N[k] = cross(B[k],T[k])
// T,B,N defines the discrete Frenet Frame of the curve
kappa[k] = length(T[k+1] - T[k]) / ds[k] // curavture
tau[k]   = -dot((B[k+1] - B[k]),N[k]) / ds[k] //torsion
with obvious restrictions on range of k, in my tests (implemented in
Matlab), the comparison with the analytic values of some example curves
is quite good.

You can also obviously fit splines, but as the torsion involves 3d
derivatives, special types of splines should be used for
torsion-continuity (tau-splines), but I don't think they are easily
available in vtk. I don't see a 'vtkPolyLineFilter' class, what would be
the best setting for an algorithm doing something like the above? what
were you intending to use? If it
can be decided, the above algorithm would be easy to implement.

Remark: there is also the concept of 'geodesic curvature' of a curve on a
surface, for which I have some references for discrete situations.

Ph


 On Tue, 13 May 2003, P Bai wrote:

> vtkCurvatures can seem to only compute the curvatures
> of a surface. Can it actually get the curvatures of a
> space curve? Or does VTK have some method to compute
> them at all?
>
> Thanks,
>
> P
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list