# Hyperbola plotting near real boundary

Plotted region above x-axis is jagged due to presence of Sqrt for y coordinate entailing delay in determining onset of real values. There is some improvement with higher number of points chosen,but gets slower.Is there a work around?

ClearAll["Global*"]
x[ph_, m_] := Sin[ph]/m;
y[ph_, m_] := Sqrt[m^2 - Cos[ph]^2];
ParametricPlot[{x[ph, m], y[ph, m]}, {ph, -Pi/2, Pi/2}, {m, 0.5, 2.5},
PlotStyle -> Yellow, PlotPoints -> {50, 50}]


The jagged effect is caused by small imaginary parts popping in near the axis. Try for example y[10^-4, 10^-4]. Then, once the cause is known ...

x[ph_, m_] = Sin[ph]/m;
y[ph_, m_] = Sqrt[m^2 - Cos[ph]^2];

ParametricPlot[
Re@{x[ph, m], y[ph, m]}, {ph, -Pi/2, Pi/2}, {m, 0.5, 2.5},
PlotStyle -> Yellow, PlotPoints -> {50, 50}]


• You didn't change too much, did you? Very nice !
– eldo
Sep 20, 2014 at 20:47
• @eldo "a minimalist approach" :) Sep 20, 2014 at 20:54
• @belisarius .. but with maximalist effect!. Thanks. Sep 20, 2014 at 20:57
• +1, pardon my dullness but could you explain how this works? When I plot e.g. ParametricPlot[{x, Sqrt[Cos[x]]}, {x, -Pi, Pi}] it seems like ParametricPlot is already ignoring any imaginary component? Sep 20, 2014 at 21:00
• @Pickett Not sure if I'm understanding your concern, but ParametricPlot doesn't ignore imaginary components, it considers them "out of region": ParametricPlot[{x, If[y > x, y, y + 10^-13 I]}, {x, 0, 1}, {y, 0, 1}]` Sep 20, 2014 at 21:26