Today I was reading an article about Zernike circle polynomials. They are used in modeling lens aberrations in optical systems. For example, the fifth Zernike polynomial represents the primary astigmatism at 45 degrees.

I gave Copilot the following command:
draw the function sqrt(6)*sqr(r)*sin(2*theta)
Copilot (partly) answer:
The function you have given is √6•√r•sin(2θ). This is a polar function, where 𝑟 is the radius and 𝜃 the angle in radians.
I expect SQR to be interpreted as mathematical operation ‘square’ and SQRT to be interpreted as mathematical operation ‘square root’. Hence, I expected the following function in Copilot answer:
√6•r2•sin(2θ)
which represents the correct Zernike polynomial.

Leave a comment