zrnk_exp: Calculate the Zernike polynomials

View source: R/zernike.R

zrnk_expR Documentation

Calculate the Zernike polynomials

Description

This function calculates the Zernike polynomials for the unit disk, or for the product of the two unit disks possibly respecting Helmholtz symetry relations.

Usage

zrnk_exp(ord, rho, phi, thetav, sym = FALSE)

Arguments

ord

Maximum radial order.

rho

Radius, [0, 1].

phi

Azimuth (radians), [0, 2*pi] or [-pi, pi]

thetav

View angle (radians), [0, pi/2]

sym

Logical. For Zernike products, if it should respect Helmholtz symetry.

Details

If thetav is missing, the function will return the Zernike terms up with radial order up to ord and all azimuthal orders. If thetav is present, the same caluclation will be performed for the product of two Zernike polynomials for isotropic conditions, i.e., azimuthal dependency is given only by the relative azimuth between pixel center and view vector projection on the surface. If sym is true, a more complex model is returned that respects Helmholtz symetry and is defined as: N * [Rkm(rhoi) * Rkn(rhos) + Rkm(rhoi) * Rkn(rhor)] * cos(k * Delta_phi) where N is the normalization factor and R are the radial polynomials of azimuthal order k and radial orders m and n.

Zernike calculations implemented in C. Vectorized use is encouraged, but rho and phi should have the same length.

Value

A matrix with Zernike terms per row and positions per column.


AlexCast/apsfs documentation built on Feb. 1, 2024, 9:48 p.m.