Professional Documents
Culture Documents
Curves Guide Altair
Curves Guide Altair
2021
Curves
Use the 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.
Figure 1.
Curves have many varies applications, some of which are listed below:
https://2021.help.altair.com/2021/hwdesktop/mv/topics/motionview/curves_r.htm 1/9
12/23/22, 5:51 PM Curves
Application Description
Vectors, Differential equations Curves may be used to define relationships that are
difficult to describe analytically.
Note: A 3D curve can also be used for certain types of constraints, such as a Point-to-Curve constraint.
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 z-coordinates 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.
https://2021.help.altair.com/2021/hwdesktop/mv/topics/motionview/curves_r.htm 2/9
12/23/22, 5:51 PM Curves
Figure 2.
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
1. From the Project Browser, select the system to which the curve is to be added.
2. Right-click on a system in the Project Browser and select Add > Reference Entity > Curve from the context
menu.
OR
Right-click on a curve folder in the Project Browser and select Add Curve from the context menu.
OR
Right-click the Curves button on the Reference toolbar.
The Add Curve dialog is displayed.
https://2021.help.altair.com/2021/hwdesktop/mv/topics/motionview/curves_r.htm 3/9
12/23/22, 5:51 PM Curves
Edit Curves
In MotionView, a curve entity is used to capture non-linear characteristics of forces and motion
or to describe constraint paths for high-pair joint types. A 2D curve is used to represent the
non-linear characteristics of forces or motion and a 3D curve can be created to use in a higher
pair joint.
From the Properties tab, you can define and edit the curve properties listed below.
1. If the Curves panel is not currently displayed, select the desired curve by clicking on it in the Project Browser
or in the modeling window.
The Curves panel is automatically displayed.
2. From the first drop-down menu, select whether to define a 2D/3D Cartesian curve or a 2D/3D parametric
curve.
3. 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 drop-down menu.
https://2021.help.altair.com/2021/hwdesktop/mv/topics/motionview/curves_r.htm 4/9
12/23/22, 5:51 PM Curves
a. Click the file browser to select the data files for the x and y vectors.
b. Define the Type, Request, and Component options for each vector.
Depending on the file chosen, the options may already be filled in.
MotionView supports several commonly used file formats such as .csv and .txt, as well as other data
formats supported by HyperGraph such as .abf, .plt, .dac, .rsp, and so on.
The curve reader can handle multiple blocks of data in the file and arrange them into Type, Requests
and Components. The Type and Requests are blocks and sub-blocks of data and a component is a
vector (or column) within the sub-block.
While using a .csv or a .txt as a data file, set the Type to Unknown. Request will appear as Block 1. If
headers are specified for columns, those headers will appear under Component. Otherwise, they would
be listed as Column 1, Column 2, and so on.
c. Enter a value in the Start Index field to specify the index number of the first data point in the subrange.
The default is 1.
d. Enter a value in the End Index field to specify the index number of the last data point in the subrange.
The word "last" can be used to specify the last data value in the file without knowing how many data
points are in the file.
e. Enter a value in the Increment field to specify the number of points to advance when reading the
subrange.
For example, to read every data point in the file, enter an increment value of 1; to read every other data
point, enter a value of 2. The default is 1.
Tip:
Click Reload data to reload the contents from the selected file into memory.
Click View File to display a Preview dialog that contains the text version of the file.
If Math is chosen, the curve calculator is displayed, allowing you to define the vector mathematically. Below
are two sample expressions:
https://2021.help.altair.com/2021/hwdesktop/mv/topics/motionview/curves_r.htm 5/9
12/23/22, 5:51 PM Curves
Expression Description
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 first-drop-down 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 on-line help.
5. From the second drop-down 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.
6. From the third drop-down 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).
7. From the fourth drop-down 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.
Tip:
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.
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.
2. 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.
Tip: Checking the Linear Extrapolation box results in the lin_extrap flag being used by the solver. Linear
extrapolation enables the solver to extrapolate the curve linearly when the computed value for the independent
variable goes out of the specified bounds.
From the Visualization tab, you can define the way you want to display, or visualize, a curve.
https://2021.help.altair.com/2021/hwdesktop/mv/topics/motionview/curves_r.htm 6/9
12/23/22, 5:51 PM Curves
Note: This tab only becomes available for 2D cartesian curves of the type File and Math.
2. Activate the Extrapolate option and enter the percentage by which you want to extrapolate the curve.
Tip:
Click Show Curve to display the curve Preview dialog.
Activate Symbols to place symbols on a curve to indicate data points.
If desired, define the curve using the User-Defined tab, which will allow you to specify the
properties of the curve using user subroutines.
a. Provide an expression with the USER solver function with parameters being passed to the user
subroutine.
b. Alternatively, activate the Use local file and function name check box to specify a local file where the
subroutine code can be accessed by the solver.
If this option is not specified, MotionSolve will search for a subroutine following its user subroutine
loading rules.
e. Specify the function name in the subroutine that defines the entity, or accept the default name
provided by MotionView.
Export a Curve
Plot data can be exported in several different formats that can be read by other software
applications.
1. From the Properties tab, click the Export Curve button to display the Export Curve dialog.
https://2021.help.altair.com/2021/hwdesktop/mv/topics/motionview/curves_r.htm 7/9
12/23/22, 5:51 PM Curves
2. Select a format for the exported data from the Type drop-down menu.
Export types for the following ASCII file types are included:
Type File Path Description
https://2021.help.altair.com/2021/hwdesktop/mv/topics/motionview/curves_r.htm 8/9
12/23/22, 5:51 PM Curves
User-specified formats .
User-specified import templates
and external readers can be
created.
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.
See Also
*Curve() (MDL Statement)
Reference_Spline (MotionSolve XML Statement)
Reference_ParamCurve (MotionSolve XML Statement)
https://2021.help.altair.com/2021/hwdesktop/mv/topics/motionview/curves_r.htm 9/9