# Equations of branches of a mind map

Sorry for the long question, but it's not so simple to explain.

Consider a mind map like this:

I want to draw branches in a cartesian coordinate system. I'd like to find two equations which define the boundaries of a branch (upper and lower). These two lines should intersect where the branch ends. Then the region between this two lines is filled and we have a branch.

These equations should take into account several factors: the starting point of the branch $P(x_1, y_1)$ (which for the first level branches is the origin $O(0, 0)$ of the axes) and the end point $Q(x_2, y_2)$ - where the mouse basically is (I will re-draw the branch if the mouse moves).

Is it possible to find such two equations that will allow me to draw a branch with that shape?

I think I can divide the problem in 3 cases:

• the end point is above the start point (i.e. $X_Q - X_P > 0$);
• the end point is at the same level of the start point (i.e. $X_Q - X_P = 0$);
• the end point is below the start point (i.e. $X_Q - X_P < 0$).

For the first case I found this:

which is given by: $\displaystyle f(x) = e^{\sin \left( \sqrt{\ln \left(\dfrac{x + .61}{3} + 1 \right)} \right) } - 1$

and its translation by the vector $[0.8067, 0]$.

For the equal case, my best try is this:

which is given by: $g(x) = \dfrac{1}{\sqrt{x + 2}} - .3$.

Finally, for the last case I can reflect the first one about the $x$ axis: .

Any other ideas?

EDIT: About sharpening the question: straight lines are not useful since I want mind map branches to be pretty. I know it's not mathematical to explain like that but there is no other way. Branches should be as close as possible to the picture's ones: mine have a very different shape. I would be thankful to anyone who could point me in the right direction.

-
To get useful answers, it would be best if you can sharpen the question a little. For example, what kind of qualitative features are you looking for? What is unsatisfactory about the solutions you already have? Why would a pair of straight lines not be good enough? And so on. –  Rahul Aug 21 '12 at 8:25
@RahulNarain: Hope that the edit clarifies things a little bit more. Let me know if you need some other information. Thank you for your interest. –  rubik Aug 22 '12 at 11:50