DrawBezier
DrawBezier [/W=winName /ABS] xOrg, yOrg, hScaling, vScaling, xWaveName, yWaveName
DrawBezier [/W=winName /ABS] xorg, yorg, hScaling, vScaling, {x0, y0, x1, y1 ...}
DrawBezier/A [/W=winName ] {xn, yn, xn+, yn+ ...}
The DrawBezier operation draws a Bezier curve with first point of the curve positioned at xOrg and yOrg.
Parameters
(xOrg, yOrg) defines the starting point for the Bezier curve in the currently active coordinate system.
hScaling and vScaling set the horizontal and vertical scale factors about the origin, with 1 meaning 100%.
The xWaveName, yWaveName version of DrawBezier gets data from the named X and Y waves. This connection is maintained so that any changes to either wave will result in updates to the Bezier curve.
To use the version of DrawBezier that takes a literal list of vertices, you place as many vertices as you like on the first line and then use as many /A versions as necessary to define all the vertices.
Flags
| /A | Appends the given vertices to the currently open Bezier (freshly drawn or current selection). | |
| /ABS | Suppresses the default subtraction of the first point from the rest of the data. | |
| /W=winName | Draws to the named window or subwindow. When omitted, action will affect the active window or subwindow. This must be the first flag specified when used in a Proc or Macro or on the command line. When identifying a subwindow with winName, see Subwindow Syntax for details on forming the window hierarchy. | |
Details
Data waves defining Bezier curves must have 1+3*n data points. Every third data point is an anchor point and lies on the curve; intervening points are control points that define the direction of the curve relative to the adjacent anchor point.
Normally, you should create and edit a Bezier curve using drawing tools, and not calculate values. See Polygon Tool and Editing a Bezier Curve for instructions.
You can include the /ABS flag to suppress the default subtraction of the first point.
To change just the origin and scale without respecifying the data use:
DrawBezier xOrg, yOrg, hScaling, vScaling,{}
It is possible to separate a Bezier curve into segments by adding coordinate pairs that are NaN. For details, see Segmented Bezier Curves.
Example
For an example using Bezier curves, see Segmented Bezier Curves.