# Plot a point on a surface [duplicate]

I would like to plot a point (in a shape of a small sphere) lying on the surface $$z=10-x^{2}-y^{2}$$. But it seems that the spherical point is being distorted. How can I make it round?

This is my code:

Show[Plot3D[10 - x^2 - y^2, {x, 0, 3.3}, {y, 0, 3.3},
PlotStyle -> Opacity[0.4], Mesh -> None,
PlotStyle -> Thickness[0.02], PlotRange -> {-1, 12},
AxesStyle -> Thick, Boxed -> False, AxesOrigin -> {0, 0, 0},
AxesLabel -> {x, y, z}], Graphics3D[{Blue, Sphere[{1, 2, 5}, 0.2]}],
BoxRatios -> {1, 1, 1}]


• Use BoxRatios -> Automatic instead of {1,1,1}. – Artes Jan 21 at 10:30
• @Artes Thanks so much. It works. – Binjiu Jan 21 at 10:31

If you want to keep BoxRatios -> {1, 1, 1}, you can do

plt1 = Plot3D[10 - x^2 - y^2, {x, 0, 3.3}, {y, 0, 3.3},
PlotStyle -> Opacity[0.4], Mesh -> None,
PlotStyle -> Thickness[0.02], PlotRange -> {-1, 12},
AxesStyle -> Thick, Boxed -> False, AxesOrigin -> {0, 0, 0},
AxesLabel -> {x, y, z}];

pr = PlotRange[plt1];

br = {1, 1, 1};

scale = Norm[Subtract @@ Transpose[pr]] Normalize[-Subtract @@@ pr]/br;

Show[plt1, Graphics3D[{Blue, Scale[Sphere[{1, 2, 5}, .1], scale]}],
BoxRatios -> br]


With br = {1, 1, 3} we get

and with br = {1, 3, 2} we get

Update: "... add an arrow (normal vector) to the point":

plt1 = Show[
Plot3D[10 - x^2 - y^2, {x, 0, 3.3}, {y, 0, 3.3},
PlotStyle -> Opacity[0.4], Mesh -> None,
PlotStyle -> Thickness[0.02], PlotRange -> {-1, 12},
AxesStyle -> Thick, Boxed -> False, AxesOrigin -> {0, 0, 0},
AxesLabel -> {x, y, z}],
Arrow[{{1, 2, 5}, {3, 6, 6}}]}], PlotRange -> All];
pr = PlotRange[plt1];
br = {1, 1, 1};
scale = Norm[Subtract @@ Transpose[pr]] Normalize[-Subtract @@@ pr]/br;

Show[plt1, Graphics3D[{Blue, Scale[Sphere[{1, 2, 5}, .1], scale]}],
BoxRatios -> br]


• Thanks so much. This is what I am looking for. Keeping the prescribed ratio has some avantages. – Binjiu Jan 21 at 10:58
• From a mathematical point of view your solution makes a confusion since a small sphere is always simply a sphere, while the graph of the function is being rescaled, even though one can believe it is a good Mathematica approach. – Artes Jan 21 at 11:12
• @Artes I understand that it is not a good Math point of view, but in my opinion, it's useful as a good way to present Math to general audiences, who may only accept that a small point on a surface should appear like a small sphere. – Binjiu Jan 21 at 20:22
• @Artes, excellent point. The different scalings for the surface and the small sphere actually means the two are on different coordinate systems and the axes of the latter not explicitly drawn. – kglr Jan 21 at 20:56
• @kglr Hi, could you manage the same thing if I add an arrow (normal vector) to the point: Graphics3D[{Red, Thickness[.01], Arrowheads[.04], Arrow[{{1, 2, 5}, {3, 6, 6}}]}] – Binjiu Jan 21 at 23:04