I have used the following code to generate eigenfunctions of a PDE:
{vals, funs} =
NDEigensystem[{-Laplacian[u[x, y], {x, y}],
DirichletCondition[u[x, y] == 0, True]},
u[x, y], {x, y} \[Element]
Polygon[{{-1/2, -1/2}, {1/2, -1/2}, {1/2, 1/2}, {-1/2, 1/2}}], 4];
By applying funs[[3]]you can see that the third eigenfunction is an interpolating function:
With contour plot:
What I now wish to do is to transform this function by rotating it anticlockwise by $\frac{\pi}{2}$ about the origin.
Let's say that the points lying on our eigenfunction are $(x,y,f(x,y))$.
I now wish to effectively move these points by perhaps taking $(x,y) \mapsto (y,-x)$
I cannot seem to find anything online to describe how to do this for these interpolating functions.
I tried defining a function R and applying it to funs[[3]] with no success.
R := Function[g, g /. Thread[{x, y} -> ({y,-x})]]
I thought that this may work as it would replace the coordinates for me, but I now know that my logic is flawed.
Please note: I am not asking how to rotate the contourplot (even though a contour plot of the transformed eigenfunction should look identical to it) I would like a transformation to be applied to the function because I intend to use it later on.
I would be really grateful if somebody could help me on this - I've been playing around with code for the past three hours.





R[funs[[1]]]. You just have to watch out whether you have an object withHeadofInterpolationFunctionor not. What your solver returns is an interpolating function, evaluated at a symbolic argument (not the actual function!). In rotating it, you have to replace the symbolic arguments by rotated versions. For what you're after, it may be better to changeNDEigensystemby replacingu[x,y]withuin argument 2. – Jens Feb 04 '16 at 00:30