Zernike: Zernike Polynomials

View source: R/zernikes.r

ZernikeR Documentation

Zernike Polynomials

Description

Routines for creating and manipulating Zernike polynomials.

Usage

Zernike(rho, theta, n, m, t)
rzernike(rho, n, m)
drzernike(rho, n, m)

Arguments

rho

normalized radius, 0 <= rho <= 1

theta

angular coordinate

n

radial polynomial order

m

azimuthal order

t

character for trig function: one of c("n", "c", "s")

Note

These functions return Zernikes scaled such that they form an orthonormal basis set for the space of functions defined on the unit circle. Note that this is not the most commonly used definition (as given e.g. in Born and Wolf). The definition I use is often associated with Noll (1976).

The function zmult can be used to convert between normalized and conventionally defined vectors of Zernike coefficients.

The basic low level functions rzernike and drzernike use numerically stable recurrence relationships for the radial Zernikes.

Author(s)

M.L. Peck mpeck1@ix.netcom.com

References

Born, M. and Wolf, E. 1999, Principles of Optics, 7th Edition, Cambridge University Press, chapter 9 and appendix VII.

Noll, R.J. 1976, Zernike polynomials and atmospheric turbulence, J. Opt. Soc. Am., Vol. 66, No. 3, p. 207.

http://wyant.opt-sci.arizona.edu/zernikes/zernikes.htm

http://mathworld.wolfram.com/ZernikePolynomial.html

See Also

makezlist, zlist.fr, zmult, zpm, pupil, pupilrms, pupilpv, strehlratio.

Examples

Zernike(1, 0, 4, 0, "n")	# == sqrt(5)

# A slightly more complex example

rho <- seq(0, 1, length = 101)
theta <- rep(0, 101)

plot(rho, Zernike(rho, theta, 6, 0, "n"), type="l", 
  ylim=c(-3.5,3.5), main="Some 6th order Zernike Polynomials")
lines(rho, Zernike(rho, theta, 5, 1, "c"), lty=2)
lines(rho, Zernike(rho, theta, 4, 2, "c"), lty=3)
lines(rho, Zernike(rho, theta, 3, 3, "c"), lty=4)

mlpeck/zernike documentation built on April 19, 2024, 3:16 p.m.