You are viewing the documentation for OpenSim 2.4. Are you looking for the latest OpenSim 4.0 Documentation?

Changing the Function Type

The Type box lets you change the type of function used to interpolate between the control points. Below is a description of each type.

  • natCubicSpline – A natural cubic spline is a third-order function with second derivatives equal to zero at the first and last control points. Moving one of the control points has the potential to modify the function over the entire range of control points. Although a natural cubic spline normally requires at least four control points, the implementation in OpenSim supports as few as two points, to be compatible with SIMM. If there are only two control points, linear interpolation is used between them, and if there are three control points, quadratic interpolation is used.
  • GCVSpline – A GCVSpline is a function that uses generalized cross-validation. The spline can be of degree 1, 3, 5, or 7, and may use smoothing when interpolating the control points. Most GCVSplines in OpenSim are fifth order, and do not include smoothing. Moving one of the control points has the potential to modify the function over the entire range of control points. When you change the type of a function to GCVSpline, the Function Editor will create a fifth-order spline with no smoothing, and thus requires a minimum of six control points. If there are fewer than six points when the type is changed, additional points will be added so that the function contains six control points.
  • PiecewiseLinearFunction – A linear function interpolates the control points by connecting each pair of adjacent points with a straight line. Moving one of the control points affects only the region of the function between the point and its two neighboring points.

  • StepFunction – A step function (also called piecewise constant, or zero-order hold) interpolates the control points using horizontal lines between each pair of adjacent points. That is, the value of the function between control points n and n+1 is the Y value of point n. Moving one of the control points affects only the region of the function between that point and the next point.
  • Constant– A constant is not actually a type of function, but is included for generality. It is implemented as a single Y value for all X values. This type is useful when defining model parameters that are usually functions. For example, in moving muscle points, each of the X, Y, and Z components of the attachment must be a function. If you want one component (e.g., Y) to remain constant, you can set its function type to Constant, and enter a single number for it (e.g., Y = 5).

 

OpenSim is supported by the Mobilize Center , an NIH Biomedical Technology Resource Center (grant P41 EB027060); the Restore Center , an NIH-funded Medical Rehabilitation Research Resource Network Center (grant P2C HD101913); and the Wu Tsai Human Performance Alliance through the Joe and Clara Tsai Foundation. See the People page for a list of the many people who have contributed to the OpenSim project over the years. ©2010-2024 OpenSim. All rights reserved.