calculating gradient vector on rotated unit square

77 Views Asked by At

What is the grad vector on the center(0.5,0.5,0) of the unit square [0,1] x [0,1] rotated by 45 deg around x axis?

The four coordinates and their function value after rotation are:

first point f(0, 0.14) = -0.35

second point f(1, 0.14) = -0.35

third point f(1, 0.85) = 0.35

fourth point f(0, 0.85) = 0.35

And the center remains as f(0.5, 0.5) =0

I assume gradient vector is always perpendicular to the surface but they way I calculated(below), is coming tangent to the surface. Could anyone explain what I have done wrong.

enter image description here

enter image description here

enter image description here