How to determine the force of a spring-damper in 3D This is not homework. I just often have to calculate forces between objects and I am interested in a systematic procedure for determining the forces.
Imagine two point masses with mass $m_1$ and $m_2$ which are connected by a linear spring (relaxed if the distance between both masses is $r_0$; spring constant $c$) and a linear viscous damper (damping constant $d$). The positions of both masses are given by the position vectors $\boldsymbol{r}_1$ and $\boldsymbol{r}_2$. The forces $\boldsymbol{F}_1$ and $\boldsymbol{F}_2=-\boldsymbol{F}_1$ are the internal forces that result from creating the free body diagram. My question is how can I write down an expression for the force $\boldsymbol{F}_1$ as a function of $\boldsymbol{r}_1,\boldsymbol{r}_2, \dot{\boldsymbol{r}}_1,\dot{\boldsymbol{r}}_2,r_0$ as well as the parameters $c$ and $d$?
I know that the total internal force $\boldsymbol{F}_1$ is the result of the addition of the spring force $\boldsymbol{F}_{\text{spring}}$ and the damper force $\boldsymbol{F}_{\text{damper}}$. Hence,
$$\boldsymbol{F}_1 = \boldsymbol{F}_\text{spring}+\boldsymbol{F}_\text{damper}.$$

Credit to @ja72: The damping force $\boldsymbol{F}_\text{damper}$ is given by
$$\boldsymbol{F}_\text{damper}=-d\left[\dfrac{{\boldsymbol{r}}^T_2-{\boldsymbol{r}}^T_1}{|{\boldsymbol{r}}_2-{\boldsymbol{r}}_1|}(\dot{\boldsymbol{r}}_2-\dot{\boldsymbol{r}}_1)\right]\dfrac{{\boldsymbol{r}}_2-{\boldsymbol{r}}_1}{|{\boldsymbol{r}}_2-{\boldsymbol{r}}_1|}.$$

And how can I set up the force $\boldsymbol{F}_\text{spring}$? If the general case with the distance $r_0$ is too complicated I would also accept an answer in which $r_0=0$.
EDIT: After the answer of @ja72. I thought that maybe it is possible to express the spring force as:
$$F_\text{spring}=-c\left[|\boldsymbol{r}_2-\boldsymbol{r}_1|-r_0\right]\dfrac{\boldsymbol{r}_2-\boldsymbol{r}_1}{|\boldsymbol{r}_2-\boldsymbol{r}_1|}.$$
Is that correct?

 A: Create a vector with the direction of the force
$$ \boldsymbol{e} = \frac{ \boldsymbol{r}_2 - \boldsymbol{r}_1 }{\|  \boldsymbol{r}_2 - \boldsymbol{r}_1 \|} $$
Now the relative velocity is
$$ v = \boldsymbol{e}^\top (\dot{\boldsymbol{r}}_2 - \dot{\boldsymbol{r}}_1 ) $$
and the damping force
$$ \boldsymbol{F}_{\rm damping} = -(d v) \boldsymbol{e} = -d\,\left( \boldsymbol{e}^\top (\dot{\boldsymbol{r}}_2 - \dot{\boldsymbol{r}}_1 ) \right)\boldsymbol{e} $$
Similarly for the spring force
$$ \boldsymbol{F}_{\rm spring} = -(c x) \boldsymbol{e} = -c\,\left( \boldsymbol{e}^\top (\boldsymbol{r}_2 - \boldsymbol{r}_1 ) -\ell \right)\boldsymbol{e} $$
Where $\ell$ is the free length of the spring.
There is a simplification that can happen with the spring force
$$ \boldsymbol{F}_{\rm spring} = -c\,\left(  \|  \boldsymbol{r}_2 - \boldsymbol{r}_1 \| -\ell \right) \frac{ \boldsymbol{r}_2 - \boldsymbol{r}_1 }{\|  \boldsymbol{r}_2 - \boldsymbol{r}_1 \|}  = $$
$$ \boldsymbol{F}_{\rm spring} = -c\,\left( (\boldsymbol{r_2}-\boldsymbol{r_1}) - \ell\, \frac{( \boldsymbol{r}_2 - \boldsymbol{r}_1 )}{\|  \boldsymbol{r}_2 - \boldsymbol{r}_1 \|} \right)
$$
