I have been experimenting with drawing curves on the surface of a sphere (of radius 1). In order for it to lie on the sphere, every point $(x,y,z)$ must satisfy: $$ \begin{equation} \tag{1} \label{Eq1} x^2 + y^2 + z^2 = 1 \end{equation} $$ I became interested in drawing something vaguely resembling the seam on a tennis ball:A tennis ball

My first guess was to try (for some parameter $\theta$ between $0$ and $2\pi$), $x(\theta)=cos(\theta)$ and $y(\theta)=sin(\theta)$, before I realised that's obviously just a circle and from $(\ref{Eq1})$ we get $z(\theta)=0$ (oops). So instead, I replaced $sin(\theta)$ with a triangular wave:

x and y

Then, using $(\ref{Eq1})$, I know $z(\theta)$ must satisfy:

$$ \begin{equation} \tag{2} \label{Eq2} z(\theta) = \pm\sqrt{1 - x^2(\theta) - y^2(\theta)} \end{equation} $$

If I just take the positive solution for all $\theta$, then my curve is discontinuous. However, if I alternate + and - (or vice versa) for each of the four quadrants, then I get a nice smooth curve like I want: Smooth curve

However, I can't figure out if there's a neat equation for describing my $z(\theta)$. It doesn't look so complicated in the graph below. Can someone tell me if there's a neat way of describing it (as some function of $\theta$)?x, y and z

Sorry for the long question and many thanks for your help!

  • $\begingroup$ Even the triangular wave which is the start of your construction doesn't have any particularly nice expression, so I don't see any reason why the 3d curve would. $\endgroup$
    – Jack M
    Commented May 29, 2018 at 20:01
  • 1
    $\begingroup$ Congratulations for your refined questions. $\endgroup$
    – Piquito
    Commented May 29, 2018 at 20:01
  • 1
    $\begingroup$ Related: math.stackexchange.com/questions/316531/… math.stackexchange.com/questions/1885357/… $\endgroup$ Commented May 29, 2018 at 20:57
  • $\begingroup$ To add a slight bit of specificity to @HagenvonEitzen's pair of related questions: this answer links to a journal article on "Generalized Baseball Curves". $\endgroup$
    – Blue
    Commented May 29, 2018 at 21:02

1 Answer 1


Here’s an idea. Parameterize the curve you want in spherical coordinates, then use the standard conversion to write the curve parametrically in cartesian coordinates. I don’t see a simple way to get the curve in the form $z=f(x,y)$, but this should be a useful technique.

Here’s my try, using a parameter range of $t=0$ to $t=2\pi$. The azimuth angle ($\theta$) of your curve goes one full turn around the $z$-axis, so let the azimuth angle be $t$. The declination angle ($\phi$) goes above and below the $\phi=\pi/2$ equator by less than $\pi/2$ and completes one sinusoid as the azimuth angle goes around. So let $\phi=\pi/2+\pi\sin(t)/3$. Because the curve must stay on the unit sphere, the radius $\rho$ is constant and equal to $1$. (This last detail is the one that makes using spherical coordinates so useful!) So a parameterization of the curve in spherical coordinates is


The coordinate conversion from spherical to $(x,y,z)$ coordinates is (always) $$(x,y,z)=\left(\rho\sin(\theta)\cos(\phi),\rho\sin(\theta)\sin(\phi),\rho\cos(\theta)\right),$$

so your curve in parametric cartesian coordinates is


Here’s a picture of that curve superimposed on the unit sphere. (I might have labeled the axes out of order, but hopefully you get the idea.)

enter image description here

After working this out, I googled “tennis ball seam curve parametric equations” and there are a lot of places to look for more ideas.

  • $\begingroup$ Thanks for your detailed answer. I tried the idea in the link (i.e. to set $\theta=(\pi/3)sin2\phi$), but it doesn't work for me. It just draws like a flower on the top of the ball. I'm not a mathematician, so I probably just can't understand the notation. It's frustrating because it seems to have nice properties - like splitting the ball into two identical pieces. $\endgroup$
    – Harry
    Commented May 30, 2018 at 11:16
  • $\begingroup$ Or, if I'm interpreting their $\theta$ and $\phi$ the wrong way around, then I feel like their assumptions are wrong - in particular that the elevation should do 2 oscillations. I think $\phi=(\pi/3)cos\theta$ looks better than $\phi=(\pi/3)sin2\theta$. $\endgroup$
    – Harry
    Commented May 30, 2018 at 11:34
  • 1
    $\begingroup$ $\thete$ and $\phi$ are sometimes reversed, so maybe that’s it. $\endgroup$
    – Steve Kass
    Commented May 30, 2018 at 13:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .