How to draw this function?

92 Views Asked by At

I have a problem where I am given this function:

$z(x, y) = \cos(x)\cos(y)^{T}$

and now I am supposed to determine if a point is above or below this plane. But I am having trouble understanding what this plane actually looks like, so I am not sure how to solve the problem of the point position. Online plotting tools did not help, they don't give me any plot for this function. Also I am not sure if this $T$ does anything to $\cos(y)$. So if anyone could explain this a bit, I would really appreciate it.

2

There are 2 best solutions below

2
On BEST ANSWER

This function forms a surface where a given point $\left(x, y, z\right)$ is "above" if the provided $z$ value is greater than your function value, i.e., $z\left(x,y\right) = \cos\left(x\right)\cos\left(y\right)^T$, or "below" if it's less. In some very rare cases, the $z$ value may match exactly (due to computers of course having a limited accuracy for real number calculations), so you can decide how to classify those points.

As for what the surface looks like, there are many packages available to draw it for you, or you can even just simply try plugging in a few values yourself to get a feel for it. Also, as mentioned in the comments, the values have a $2 \pi$ period due to the use of $\cos$, so the surface will repeat itself every $2 \pi$ units in both the $x$ and $y$ directions.

As for setting up the neural network, that obviously is something which this forum is not an appropriate place to discuss. Good luck with doing that.

0
On

Take a look at the following "eggbox" representation of surface with equation :

$$z=\cos(x)\cos(y)$$

(no need for the transposition) with its associated level sets, of primary importance for the question you are asked.

Note that "peaks" are red and "pits" are blue, and that the same color convention is valid for level sets.

enter image description here

A way to understand this surface : If you fix for example $x=\pi/3$, it means that when you cut this "cake" at this abscissa, as $\cos(\pi/3)=1/2$, the profile of the cut is a sine curve with equation $z=\frac12 \cos(y)$.