CREATE A CURVE WITH CUSTOM DEFINITION

Creates a curve from a user-supplied PHP-style code snippet that returns an array of (x, y) point pairs. Use this worker when a curve cannot be expressed by a standard mathematical template and requires custom procedural logic to generate its data points.

When to use

Classification: process.

Tagged: code_editor, curve, custom_curve, php, points, transformation, user_defined.

Inputs

Label ID Type Default Required Description
Curve Name curve_name scalar Display name assigned to the generated curve; used as a label in downstream plots and reports. Accepts any free-text string; leave blank to use the worker default.
Definition definition text <?php $points = array(); $points[] = array( 0, 1 ); // x , y $points[] = array( 0, 2 ); // x , y // # the points variable will be used to construct the curve by d3VIEW PHP-style code block that constructs the curve; must populate a $points array of [x, y] pairs (or provide a run() function/class method returning the same structure). Edit in the built-in code editor; the default skeleton shows two sample points to illustrate the expected format.

Outputs

Label ID Type Description
Curve curve_def vector The generated curve as an (x, y) vector, built from the point pairs returned by the user-defined code snippet; passed downstream for plotting, transformation, or further analysis.

Disciplines

  • data.curve.transform

Runnable example

A runnable example is registered for this worker. Open the example workflow on the d3VIEW canvas: /api/workflow/example?id=curve_user_defined


Auto-generated from transformation schema. Worker id: curve_user_defined. Schema hash: 5bd5a52ad281. Hand-curated docs in workerexamples/ override this page when present.