TRIM
The TRIM function smoothly interpolates between the slope m1 defined through the line segment given by x0, y0, x1, y1 and m2 defined through the line segment given by x1, y1, x2, y2.
Format
TRIM(x, x0, y0, x1, y1, x2, y2, radius [, limit])Description
For values x < xI1, the function is guaranteed to return the point corresponding to x on the line through x0, y0 and x1, y1. For values x > xI2 the function is guaranteed to return the point corresponding to x on the line defined through x1, y1 and x2, y2.
For values of x in between xI1 and xI2, the function value does a smooth transition between both slopes where the derivative of TRIM with respect to x is always in between m1 and m2.
Arguments
- x
- The independent variable.
- x0
- The x value of a point on line segment 1.
- y0
- The y value of a point on line segment 1.
- x1
- The x value for the intersection point between line segment 1 and line segment 2.
- y1
- The y value for the intersection point between line segment 1 and line segment 2.
- x2
- The x value of a point on line segment 2.
- y2
- The y value of a point on line segment 2.
- radius
- Specifies the radius around x1, y1 for which the TRIM function interpolates the slope. The radius has to be positive.
- limit
- Limits the radius relative to the shorter line-segment's length. This argument is optional and if it is not specified, a value of 0.5 is used.
Example
TRIM(time, 0,0, 1,1, 2, 0, .1)