Docs / Shaping functions

Glossary: DoubleOddPolynomialSeat

The curve of DoubleOddPolynomialSeat, its parameters and its constructor.

Color legend plain property method

Two odd powers that meet flat at (A, B): the cubic seat with a longer, flatter pause as N grows.

A class in the category ShapingFunctionCategory.NOrder. It derives from BaseShapingFunction and has its members too: CalculateOutput gives the curve. The parameters page shows it in context, with what its parameters do.

Names are colored by what they are: a property or a method; values and fields keep the plain color.

The curve

The curve of DoubleOddPolynomialSeat for several settings of its parameters
A = 0.5 and B = 0.5, with N = 1, 2 and 4: the higher N, the wider the flat part.
Property Value
Id ShapingFunctionId.DoubleOddPolynomialSeat, number 39
Category ShapingFunctionCategory.NOrder
Name "Double Odd Polynomial Seat"
Order null
ParameterCount 2
HasVariableOrder true

For an input x from 0 to 1, the output is B − B(1 − x / A)2N + 1 up to x = A, and B + (1 − B)((x − A) / (1 − A))2N + 1 after it.

With N = 1, its default, it is CubicDoubleSeat; each higher N widens the flat part around (A, B), and a very high N turns the curve into a plateau at B. With its defaults it is CubicEaseIn to within 0.00001, so set A and B before using it. It stays within 0 to 1 and never goes back.

Properties

A →

float · From IOneParameter. The x of the point where the two halves meet, flat. Clamped to 0.00001 to 0.99999 when set, so the curve never divides by 0; 0.00001 by default. Throws ArgumentOutOfRangeException for NaN and keeps the value it had.

B →

float · From ITwoParameters. The y of that point: the curve is flat at (A, B). Clamped to 0 to 1 when set; 0 by default. Throws ArgumentOutOfRangeException for NaN and keeps the value it had.

N →

int · From INOrder. The order: the two halves are powers of 2N + 1, so 1 gives the cubic seat and each higher order a longer, flatter seat. Clamped to 1 to 1,073,741,823 when set, the most for which 2N + 1 fits in an int; 1 by default. Useful from 1 to about 20.

Methods

DoubleOddPolynomialSeat() →

DoubleOddPolynomialSeat() · Creates the curve, with its parameters at their defaults. ShapingFunctionFactory.Create creates the same from ShapingFunctionId.DoubleOddPolynomialSeat.