[vtkusers] Convert vtkPiecewiseFunction to Hermite splines?

Elvis Stansvik elvis.stansvik at orexplore.com
Fri Mar 4 09:04:14 EST 2016


Hi all,

I'm interested in converting to/from Beziers to the Hermite form used by
vtkPiecewiseFunction. The form used by vtkPiecewiseFunction is slightly
special (never seen it before), in that it's based on the sharpness and
midpoint parameters of the points.

I'm struggling a little with converting these back to "normal" Hermite form
(endpoints + endpoint derivatives) as described at e.g. Wikipedia [1],
which would be a first step towards converting to/from Beziers (of course
there's some closed formula for direct conversion to Beziers, but I'd like
to do it in steps to understand it better).

Has anyone been in the same situation, and could help out a slightly maths
challenged person like myself? My use case is making an opacity transfer
function editor that works with Beziers + straight line segments (so not
like the editor in e.g. Paraview).

Cheers,
Elvis

[1] https://en.wikipedia.org/wiki/Cubic_Hermite_spline
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160304/0e1c962b/attachment.html>


More information about the vtkusers mailing list