I'd like to simply add a nice thick point in $(0,0,0)$ to Plot3D[(y^2/x), {x, -3, 3}, {y, -3, 3}].

The solutions I came across to add anything to Plot3D, mostly involved MeshFunctions. However I don't see how I could manipulate the mesh to give the desired result.

Any help would be appreciated.

  • 2
    $\begingroup$ Use Show and add Graphics3D[{[email protected], Point[{0,0,0}]}]. And welcome to Mathematica.SE :) $\endgroup$
    – Kuba
    Commented Jan 30, 2014 at 21:04
  • $\begingroup$ closely related: add point to existing graphic $\endgroup$
    – Kuba
    Commented Jan 30, 2014 at 21:11

2 Answers 2

  Plot3D[(y^2/x), {x, -3, 3}, {y, -3, 3}, 
    PlotStyle -> Opacity[0.3]], 
  Graphics3D[{Red, PointSize[0.1], Point[{0, 0, 0}]}]]

This may be an overkill but it is useful (no joke!) cause when you export points and lines they tend to look odd the thicker they are. You can fake a red point by re-difining your ColorFunction like so:

With[{colf = Function[{x, y, z},
    If[Norm@{x, y} < .15,
(* Define a color function that is red within some radius (here 0.15) and something else outside*)
 Plot3D[(y^2/x), {x, -3, 3}, {y, -3, 3},  
  ColorFunction -> colf, 
  ColorFunctionScaling -> False,
   PlotRange -> All, 
  PlotPoints -> 80]

and the result will not suffer from the problems that a thick point would have:

re point


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.