TITLE: Connecting points with a spline based on a logarithmic spiral
QUESTION [1 upvotes]: Suppose I have two points $\vec p_1$ and $\vec p_2$. How can I calculate the equation for the logarithmic spiral that passes through $\vec p_1$ at an angle of $\theta_1$ and through $\vec p_2$ at an angle of $\theta_2$? Angles are measured relative to the x-axis and are between $0$ and $2\pi$. For shorthand, let $\Delta\theta=\theta_2-\theta_1$
Given a logarithmic spiral with a center at $\vec{s}=\langle s_x,\ s_y\rangle$, the equation for the spiral is 
$$\vec f(\theta)=e^{b+m\theta}\langle\cos(\theta+\alpha),\ \sin(\theta+\alpha)\rangle+\vec s$$
I need to find $b,\ m,\ \alpha,\ s_x$ and $s_y $ such that $\vec f(0)=\vec p_1$, $\vec f(\Delta\theta)=\vec p_2$, and $\tan^{-1}(m,1)+\alpha=\theta_1$. (See here). Written out these equations are:
$$s_x+e^{b}\cos(\alpha)=x_1$$
$$s_y+e^{b}\sin(\alpha)=y_1$$
$$s_x+e^{b+m\Delta\theta}\cos(\alpha+\Delta\theta)=x_2$$
$$s_y+e^{b+m\Delta\theta}\sin(\alpha+\Delta\theta)=y_2$$
$$\tan^{-1}(m,1)+\alpha=\theta_1$$
Which can be reduced to two equations because $m=\cot(\theta_1 - \alpha)$, $s_x=x_1-e^b \cos(\alpha)$, and $s_y=y_1-e^b \sin(\alpha)$. Based on this we end up with:
$$x_1-e^b \cos(\alpha)+e^{b+\cot(\theta_1 - \alpha)\Delta\theta}\cos(\alpha+\Delta\theta)=x_2$$
$$y_1-e^b \sin(\alpha)+e^{b+\cot(\theta_1 - \alpha)\Delta\theta}\sin(\alpha+\Delta\theta)=y_2$$
Which puts it in terms of just $b$ and $\alpha$, however these equations are still problematic to solve. Can anyone help with this?

REPLY [1 votes]: As I see the problem, you have two points in space and you would like a logarithmic spiral to pass through them at specified polar angles. We have four parameters at our disposal: flair coefficient, $b$, scale, say $e^a$, rotation, $e^{i\alpha}$, and translation, s. Then we can write the equation for a logarithmic spiral in the complex plane as
$$z=e^ae^{(b+i)\theta}e^{i\alpha}+s$$
The first thing we can do is to simplify this by using a complex flair coefficient, say $B$, so that we can dispense with the rotation. Then
$$z=e^ae^{(B+i)\theta}+s$$
Note that this no longer a true logarithmic spiral because $e^{i\Im\{B\}\theta} \ne e^{i\alpha}$. However, it has similar characteristics.
Applying the conditions at the specified points
$$
p_1=e^ae^{(B+i))\theta_1}+s\\
p_2=e^ae^{(B+i))\theta_2}+s
$$
we see that we have two equations in three unknowns: $a,B,s$. These equations are intractable until an additional condition is specified.
Let me suggest a simpler problem that may meet your needs. Consider that the spiral starts at $p_1$ and passes through $p_2$ and the specified polar angle $\theta_2$. The we have simply
$$
z=p_1e^{(B+i)\theta}\\
p_2=p_1e^{(B+i)\theta_2}\\
\text{so that}\\
B=\frac{\ln(p_2/p_1)}{\theta_2}-i
$$
And if you want the flair coefficient,
$$b=\Re\{B\}$$
I have tested this with random $p_{1,2}$ and $\theta_2$.
{"set_name": "stack_exchange", "score": 1, "question_id": 2065542}