Leading up to this, I had to do this for a circle, then a sphere, and then 4 dimensions. Trying to recognize the pattern...$\large x_1^2+x_2^2+...+x_n^2=r^2$ $\large x_1=\sqrt{r^2-x_n^2-x_{n-1}^2-...-x_2^2}$