1
$\begingroup$

I have to plot the hyperbola (3 of them actually) in MATLAB, and so it'd be good if I could find some sort of general formula.

The foci do not necessarily have to be on the axes (e.g. $(5,3)$ and $(4,8)$ can also be the foci). I have the difference in distances between them at a point which lies on the hyperbola. Will there be a general equation describing this hyperbola? If yes, what will it be? (e.g. say the points are $(x_1,y_1)$ & $(x_2,y_2)$ and difference in distance is $d$).

I know that I can shift and rotate the axes so that I get what I want, but I wanted to know if there was a better method, since while plotting i'll have to reconvert the values into the normal axes.

I'm going to try trilateration, which is why i'm asking for the equation.

  • 0
    The answers to this question http://math.stackexchange.com/questions/31756/find-equation-for-hyperbola provide what you are looking for, I think.2012-01-22
  • 0
    Actually, one of the answers specifically addresses the case where the foci are not on the axes, and just about everything else possible for a hyperbola. It is a remarkably fine answer http://math.stackexchange.com/a/31761/92602012-01-22
  • 0
    @FeralOink - Thanks! :)2012-01-22
  • 1
    The equation of the hyperbola is an implicit one. Can't you plot implicit equations?2012-01-22
  • 0
    Simply put, if you need to use *parametric equations* as opposed to an implicit Cartesian equation, rotate/shift is really the only way to go. Otherwise, if your computing environment supports implicit plotting, then even the obvious approach of using the distance formula works nicely.2012-07-24

2 Answers 2