Product Documentation
Virtuoso Studio Design Environment SKILL Reference
Product Version IC23.1, November 2023

ccCubicSplineConnector

ccCubicSplineConnector(
l_points
[ ?d1 n_d1 ]
[ ?d2 n_d2 ]
) 
=> o_polyCurve / nil

Description

(Virtuoso Photonics Option) Returns a polyCurve representing a cubic spline function in the form where y is a function of x through the given list of points (x,y) with strictly increasing coordinates x.

y = f(x)

Optionally, n_d1 and n_d2 specify the first derivatives of the function f(x) at the first and the last point, respectively. Otherwise, if the first derivative at any of the endpoints is not specified, the second derivative of the function f(x) at the corresponding endpoint is zero.

Arguments

l_points

List of N > 3 points with strictly increasing coordinates n_x1 <...< n_xN.

List(list(n_x1 n_y1)...list (n_xN n_yN))

?d1 n_d1

First derivative of the cubic spline function f(x) at the first point.

?d2 n_d2

First derivative of the cubic spline function f(x) at the last point.

Value Returned

o_polyCurve

ID of the resulting ccPolyCurve.

nil

An error occurred.

Example

Create a cubic spline through four points with coordinates (2, 4), (5, 2), (7, 3), (10, 1) with zero first derivative at the first point and zero second derivative at the last point:

ccCubicSplineConnector(list(2:4 5:2 7:3 10:1) ?d1 0)
> cc@0x1b6a029

Related Topics

Curvy Core Mathematical Object Attribute Query Functions


Return to top
 ⠀
X