I really want to know how to plot the Cartesian grid lines on a 2D plane onto a sphere in the context of stereographic projection. I found this image showing what I want to plot. Can anyone help me to obtain the code to plot this sphere using SphericalPlot3D and MeshFunctions?


  • $\begingroup$ It would help if you provided the definition of Cartesian grid lines. $\endgroup$
    – MarcoB
    Jun 10, 2020 at 23:51

1 Answer 1


This looks like a stereographic projection to me:

stereo[{x_, y_}] := {
  (2 x)/(1 + x^2 + y^2),
  (2 y)/(1 + x^2 + y^2),
  (-1 + x^2 + y^2)/(1 + x^2 + y^2)}
 stereo[{x, y}], {x, -2 π, 2 π}, {y, -2 π, 2 π}, 
 PlotRange -> Full, PlotTheme -> "Classic"]

stereographic projection of the plane


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.