How to find point in sphere surface? Let $S$ be a sphere with origin at $(0,0,0)$.

Let $P$ be a point in $S$ surface, whose $y$ coordinate is a given $y_0$.

Let $(x_0, 0, z_0)$ be any point of the line from $(0,0,0)$ to the "shadow" of $P$ (projection of $P$ in the plane $y=0$).

How can I find $P$ ?
By spherical coordinates, exchanging y and z with respect to the usual convention in the following image



$$R=y_0 \cos \phi\implies\cos \phi=\frac{R}{y_0}\implies\sin \phi=\pm\sqrt{1-\cos \phi}$$

Note: the sign depends upon the sign of $y_0$

From $x_0$ and $z_0$ we can obtain 


$\cos \theta = \frac{x_0}{\sqrt{x_0^2+z_0^2}}$
$\sin \theta = \frac{z_0}{\sqrt{x_0^2+z_0^2}}$


then we can calculate


$x=R\sin \phi \cos \theta$
$z=R\sin \phi \sin \theta$


therefore we can determine $P(x,y_0,z)$.
Let $u = \frac{(x_0,0,z_0)}{\|(x_0,0,z_0)\|}$. Then, $\langle u, P\rangle = (p_1, 0, p_3)$ where $p_1$ is the x-coordinate of $P$ and $p_3$ is the z-coordinate of $P$. Since you know the $y$ coordinate, we have $P=(p_1, y_0, p_3) = u+(0,y_0,0)$.