ConvexHull (FPScript)
Calculates the convex hull of a two-dimensional point set.
Syntax
ConvexHull(Points [ , Algorithm = CONVEXHULL_GRAHAM_SCAN ])
or
ConvexHull(Y, X [ , Algorithm = CONVEXHULL_GRAHAM_SCAN ])
The syntax of the ConvexHull function consists of the following parts:
Part |
Description |
||||||
---|---|---|---|---|---|---|---|
Points |
The Y and X points for which the convex hull is to be calculated. Permitted data structures are signal. All real data types are permitted, except calendar time und time span. If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
||||||
Y |
The Y points used to calculate the convex hull. If you specify a signal, then its Y component is used. Permitted data structures are data series und signal. All real data types are permitted, except calendar time und time span. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
||||||
X |
The X points used to calculate the convex hull. If you specify a signal, then its Y component is used. Permitted data structures are data series und signal. All real data types are permitted, except calendar time und time span. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
||||||
Algorithm |
Determines the algorithm for calculating the convex hull. The argument Algorithm can have the following values:
If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value CONVEXHULL_GRAHAM_SCAN. |
Remarks
The result always has the data structure signal.
The values are converted to 64-bit floating points before the calculation is made.
Available in
FlexPro Basic, Professional, Developer Suite
Examples
Dim y = Noise(1# 100, NOISE_NORMAL, 0)
Dim x = Noise(1# 100, NOISE_NORMAL, 0)
Dim points = Signal(y, x)
List("Points", points, "Convex Hull", ConvexHull(points))
Calculates the convex hull of randomly distributed points in the two-dimensional plane.