Cubic interpolating plane curve or space curve
Simscape / Multibody / Curves and Surfaces
This block represents a continuous spline curve based on cubic interpolation between the points specified. The curve can be two-dimensional, such as a planar cam profile, or three-dimensional, such as a roller coaster track. Depending on the end conditions selected, the curve can be either open or closed.
Cam profile — An Example of a 2-D Spline Curve
Whether a spline curve is two- or three-dimensional depends solely on the coordinate matrix dimensions. A two-column matrix specifies a two-dimensional curve in the xy plane. Each row in this matrix provides the [x, y] coordinates of a point. A three-column matrix specifies a three-dimensional curve. Each row in this matrix provides the [x, y, z] coordinates of a point. All coordinates are resolved in the local reference frame of the block.
The spline curve is a piecewise function of third-order polynomial segments connected end-to-end. The curve is built such that adjacent polynomial segments have the same first and second derivatives at the shared end point. If the curve is periodic, an additional curve segment connects the last point specified to the first point. The first and second derivatives of this segment matches those of the adjacent segments at the shared end point.
R— Reference frame
Spline curve reference frame. Connect this frame port to that of another block to resolve the placement of the spline curve in a model.
G— Geometry Specification
Spline curve geometry. Connect this geometry port to that of a Point On Curve Constraint block to provide that block with a spline curve specification.
Interpolation Points— Matrix of points used to generate the spline
Coordinates of the interpolation points specified as an [x, y] matrix for a 2-D curve or [x, y, z] matrix for a 3-D curve. Coordinates are resolved in the reference frame of the block.
If you set the end conditions to
(Closed), the block joins the first and last data points
with an additional spline segment. Like all spline segments, the additional
segment and its first two derivatives are continuous at the shared point.
Each data point in the coordinate matrix must be unique. If the curve is closed, you must ensure that the first and last data points have different coordinates.
End Conditions— Treatment to apply to the curve end points
Type of end conditions to use. Periodic end conditions correspond to a
closed curve. Natural end conditions correspond to an open curve. The
default setting is
Type— Spline visualization setting
Visualization setting for this spline. Use the default setting,
From Geometry, to show the spline. Select
Marker to show a graphic marker such as a
sphere or frame. Select
None to disable
visualization for this spline.
Marker: Shape— Shape of the graphic marker
Geometrical shape of the graphic marker. Mechanics Explorer shows the marker using the selected shape.
Marker: Size— Pixel size of the graphic marker
Absolute size of the graphic marker in screen pixels. The marker size is invariant with zoom level.