pyoptools.misc.function_2d.poly_r.poly_r_deriv module¶
- class pyoptools.misc.function_2d.poly_r.poly_r_deriv.PolyRDeriv¶
Bases:
Function2DClass that represents the derivative of a radial polynomial.
This class implements the calculation of the partial derivatives of a radial polynomial with respect to x or y coordinates. A radial polynomial is a polynomial expressed in terms of the radial coordinate r = sqrt(x^2 + y^2).
- Parameters:
coeff (list) – List of coefficients of the radial polynomial. The i-th element corresponds to the coefficient of r^i.
axis (int) – Axis along which to take the derivative. Must be 0 (for x) or 1 (for y).
- order¶
The order of the polynomial (number of coefficients - 1)
- Type:
int
- axis¶
Axis along which to take the derivative (0 for x, 1 for y)
- Type:
int
- _coeff¶
Eigen vector storing the polynomial coefficients
- Type:
VectorXd
- eval(x, y)¶
Evaluate the derivative of the radial polynomial over a grid of points.
- Parameters:
- Returns:
Array containing the values of the polynomial derivative evaluated at each point (x[i,j], y[i,j]).
- Return type:
Notes
This method calls the C-level eval_cy function for each point in the input arrays. Input arrays must have the same shape.