Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

How can I plot the hyperbola represented by the following complex equation:

$$\left|z-a\right|-\left|z-b\right|=2t\tag{1}$$

Should I convert (1) into the following form?

ContourPlot[x^2 - y^2 == 1, {x, -2, 2}, {y, -2, 2}]

contour plot of hyperbola

share|improve this question
    
You can start from ComplexExpand[Abs[x + I y - a] - Abs[x + I y - b], TargetFunctions -> {Re, Im}], which doe not give an hyperbola though. –  b.gatessucks Jul 21 '13 at 8:59
    
Are you sure the complex expression above is a hyperbola? What do the $a, b, t$ stand for? Assuming that the $a$ and $b$ are the same as in $\frac{x^2}{a^2} - \frac{y^2}{b^2} = 1$, then that is not a hyperbola. For instance, what happens when $a=b$? –  rm -rf Jul 21 '13 at 16:36
    
You can the function defined here: Coloring a shape according to a function, e.g. ParametricPlot[cc[u, 3/2], {u, 0, 2 Pi}, Axes -> False, PlotStyle -> Thick, ColorFunction -> Function[{x, y, u}, Hue[u/(2 Pi)]], ColorFunctionScaling -> False, Exclusions -> {Cos[u] == 2/3, Cos[u] == -2/3}] –  Artes Jul 21 '13 at 18:21
add comment

1 Answer

Since you're trying to plot an implicit equation, you would normally use ContourPlot. For example, to get two branches satisfying the equation for $t = 1$, just do this:

With[{a = 2, b = 1},
 ContourPlot[
  Abs[x + I y - a] - Abs[x + I y - b], {x, -1, 3}, {y, -2, 2}, 
  Contours -> {1/2, -1/2}, ContourShading -> False, 
  ContourStyle -> ColorData[1][1]
  ]
 ]

contours

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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