Spline2D/Curves
Use the Spline2D/Curves tool to create and edit curves.
Curves Overview
A curve consists of two or more column vectors that can be used either to create XY data (referred as 2D spline) or a line geometry in 3D modeling space (3D curve). The 2D spline can be used as reference input for other MotionView entities such as a force or motion. The 3D curve can be used for certain types of constraints such as a Point to Curve (PTCV) constraint.
Curves have many varies applications, some of which are listed below:
Application  Description 

Forces  Forces are used to define nonlinear characteristics for the forces. The curve may represent a spring force versus deformation characteristic or a damping force versus deformation velocity characteristic. This data is frequently measured experimentally. 
Motions  Motions are used to define nonlinear displacements versus time, velocity versus time, and/or acceleration versus time 
Vectors, Differential equations  Curves may be used to define relationships that are difficult to describe analytically. 
 2D Curves
 3D curves
Cartesian Curve
A Cartesian curve simply consists of two or more vectors that could be defined independent to each other, yet they should consist of same number of data points.
Paramteric Curve
A Parametric curve is defined in terms of one free parameter, u. Referring to the image below, assume a curve C is defined with respect to a coordinate system OXYZ. The coordinates of any arbitrary point on the curve P, as measured in OXYZ, can be represented uniquely in terms of the free parameter u with three functions, f(u), g(u), and h(u), that define the x, y and zcoordinates of P. The extent of the curve is governed by the start and end values of u. This is a parametric representation for a curve.
A 2D Parametric curve has three vectors – that is, one free parameter vector U, and two dependent vectors X and Y.
A 3D parametric curve has fours vectors – that is, one free parameter U, and three dependent vectors X, Y, and Z.
Create Curves
The Curves tool to create and edit curves.
 From the Model Browser, select the system to which the curve is to be added.

Rightclick on a system in the Model Browser and select from the context menu.
ORRightclick on a curve folder in the Model Browser and select Add Curve from the context menu.ORFrom the Model ribbon, Splines tool set, click the Spline2Ds(Curves) icon.The Add Curve dialog is displayed.

Specify a label for the curve.
The curve label can be changed at any time.

Specify a variable name for the curve.
By default, variables names of entities in MotionView follow a certain convention. For example, all curve entities have a variable name starting with “crv_”. This is the recommended convention to follow when building models in MotionView since it has many advantages in model editing and model manipulation.

Click OK to close the window or
Apply to continue creating entities.
Once a curve entity has been added to the model, the panel for the curve will automatically be displayed in the panel area.
Edit Curves
In MotionView, a curve entity is used to capture nonlinear characteristics of forces and motion or to describe constraint paths for highpair joint types. A 2D curve is used to represent the nonlinear characteristics of forces or motion and a 3D curve can be created to use in a higher pair joint.
Define the Properties of Curves
From the Properties tab, you can define and edit the curve properties listed below.

If the Curves panel is not currently displayed, select the desired curve by
clicking on it in the Model Browser or in the modeling window.
The Curves panel is automatically displayed.
 From the first dropdown menu, select whether to define a 2D/3D Cartesian curve or a 2D/3D parametric curve.
 Select the u, x, y, or z radio buttons (depending on your selection in the previous step) and choose File, Math or Values as the data source for the curve from the corresponding dropdown menu.

Define the data source.
If File is chosen:If Math is chosen, the curve calculator is displayed, allowing you to define the vector mathematically. Below are two sample expressions:
Expression Description crv_2d_math.x = 0:10:1 X vector expression to generate a series of numbers from 0 to 5 at regular intervals of 0.1. crv_2d_math.y = cos(crv_2d_math.x) Y vector expression to apply a cosine function on the X vector of the curve. If Values is chosen, enter the u, x, y, and z data values for each point. You can cut, copy, paste and insert data point values using the buttons to the right of the table.Note: The available data points will depend on your curve type selection in the firstdropdown menu.Tip: Click to view the Data Values dialog containing all data points.For more information on the Type, Request, and Component options, see Building Plots with XY Data Files in the HyperGraph online help.

From the second dropdown menu, specify if the curve will be written to the
solver file.
This option determines if the curve data is exported to the solver input deck.

From the third dropdown menu, select Curve points or
Control points.
This option determines if the points are to be exactly on the curve (curve points) or used to fit the curve (control points).

From the fourth dropdown menu, select Open Curve or
Closed curve.
This options determines whether or not the first and last point should be connected for a closed curve. Choosing Closed curve results in a continuous path for a constraint using this curve.
 Click Show Curve to display a curve preview dialog.
 Click Export Curve to display the Export Curve dialog, which allows you yo export plot data in several different formats that can be read by other software applications. See the Export a Curve topic for additional information.
Define the Attributes of Curves
From the Attribute tab, you can define the scale and offset for the X and Y vectors. When a data vector is scaled, the vector is multiplied by a specified value. The original data values are not actually altered. Offsetting a data vector shifts the data along the corresponding axis.
 Click the Attributes tab.

Enter values in the Scale and Offset fields for the U, X, Y, and/or Z
directions (depending on your selections in the Properties tab).
You can also enter math expressions, such as one for converting Fahrenheit to Celsius, in the scale and offset fields.
Define the Visualization of Curves
From the Visualization tab, you can define the way you want to display, or visualize, a curve.
 Click the Visualization tab.
 Select the Extrapolate option and enter the percentage by which you want to extrapolate the curve.
 Select the Interpolate option.
 From the dropdown menu, select a method to interpolate the curve:
 Click Show Curve to display the curve Preview dialog.
 Select Symbols to place symbols on a curve to indicate data points.
UserDefined Properties for a Curve
If desired, define the curve using the UserDefined tab, which will allow you to specify the properties of the curve using user subroutines.
 From the Properties tab, click the Userdefined check box.
 Click the newly added UserDefined tab.

Define the user subroutine.
Export a Curve
Plot data can be exported in several different formats that can be read by other software applications.
 From the Properties tab, click the Export Curve button to display the Export Curve dialog.

Select a format for the exported data from the Type dropdown menu.
Export types for the following ASCII file types are included:
Type File Path Description Excel .csv CSV, comma separated values format. CSV is compatible with most spreadsheet applications. Commas delimit the data. Columns .col One column for X data and another for Y data. A blank line separates each curve in the plot. Tabs delimit the data. XY Data .dat One column for X data and another for Y data. The data set for each curve in the plot begins with XYDATA and ends with ENDATA. The XY units and the axis labels are included at the top of each data set. Tabs delimit the data. HyperMesh uses this format. X Graph .xrg One column for X data and another for Y data. The XY units and the axis labels are included as comments at the top of each data set. Tabs delimit the data. Summary .sum The summary file contains the plot title and a table listing the curves in the plot, the X and Y data labels, and the min and max values of each curve. ADAMS Spline .adm The X values for each curve are listed in comma delimited columns followed by the Y values in comma delimited columns. The first data set in the file is labeled SPLINE/0. The label for each successive data set is incremented by one. Altair Binary .abf All curves in the window are written to an Altair Binary format file. DAC .dac Exports curve data to DAC files, one file per curve. If more than one curve is requested, the name of the output file is modified by adding the unique request name to the file name. RPC .rsp Exports curve data to RPC files, with all curves going to one file. Excel Europe .csv Writes out a file with the CSV extension, but uses a semicolon instead of a comma to separate columns. Userspecified formats . Userspecified import templates and external readers can be created.
See the HyperGraph online help for additional information.
Note: Export templates can be added to the Export Curve dialog using the *AddExportFormat() statement in the preference.mvw file.See MotionScript Reference for more information on adding export formats.
Export format templates are written using the Templex programming language.

In the File field, enter a name for the exported file.
The file is stored in the selected directory using the file browser or the directory from which the program was started. The default file name is export.ext, where ext indicates the file type specified in the export template.