12

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.

hauptbenutzer
  • 223
  • 1
  • 2
  • 4

2 Answers2

15
Show[
  Plot3D[(y^2/x), {x, -3, 3}, {y, -3, 3}, 
    PlotStyle -> Opacity[0.3]], 
  Graphics3D[{Red, PointSize[0.1], Point[{0, 0, 0}]}]]
m_goldberg
  • 107,779
  • 16
  • 103
  • 257
Zviovich
  • 9,308
  • 1
  • 30
  • 52
3

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,
     Red,
     ColorData["BlueGreenYellow"][z]]]},
(* 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

gpap
  • 9,707
  • 3
  • 24
  • 66