$
\def \J {\Delta}
\def \half {\frac{1}{2}}
\def \kwart {\frac{1}{4}}
\def \hieruit {\quad \Longrightarrow \quad}
\def \slechts {\quad \Longleftrightarrow \quad}
\def \norm {\frac{1}{\sigma \sqrt{2\pi}} \; }
\def \EN {\quad \mbox{and} \quad}
\def \OF {\quad \mbox{or} \quad}
\def \wit {\quad \mbox{;} \quad}
\def \spekhaken {\iint}
\newcommand{\dq}[2]{\displaystyle \frac{\partial #1}{\partial #2}}
\newcommand{\oq}[2]{\partial #1 / \partial #2}
\newcommand{\qq}[3]{\frac{\partial^2 #1}{{\partial #2}{\partial #3}}}
\def \erf {\operatorname{Erf}}
$
Fuzzyfied Lines Unclipped
The final formula from the previous paragraph is repeated here for convenience:
$$
L(x,y) = \frac{D}{\sigma\sqrt{2\pi}}
\; . \; e^{-\half\left\{
\left| (\vec{r}_1-\vec{r}_0) \times (\vec{r}-\vec{r}_0)\right|^2
/ (\vec{r}_1-\vec{r}_0 \cdot \vec{r}_1-\vec{r}_0) \right\} / \sigma^2}
$$ $$
\;.\;\left[ \erf\left(
\frac{(\vec{r}_1-\vec{r}_0 \cdot \vec{r}-\vec{r}_0)}
{\sigma \sqrt{(\vec{r}_1-\vec{r}_0 \cdot \vec{r}_1-\vec{r}_0)}}\right)
- \erf\left(
\frac{(\vec{r}_1-\vec{r}_0 \cdot \vec{r}-\vec{r}_1)}
{\sigma \sqrt{(\vec{r}_1-\vec{r}_0 \cdot \vec{r}_1-\vec{r}_0)}}\right)
\right]
$$
There exists a sensible interpretation of the factor with the error functions:
$$
\frac{(\vec{r}_1-\vec{r}_0 \cdot \vec{r}-\vec{r}_{0,1})}
{\sqrt{(\vec{r}_1-\vec{r}_0 \cdot \vec{r}_1-\vec{r}_0)}}
$$
According to the theory of inner products, these terms denote a
projection, along the line segment $(\vec{r}_1-\vec{r}_0)$, of the vectors
joining the point $\vec{r}$ in the plane, with the startpoint $\vec{r}_0$ or
endpoint $\vec{r}_1$, respectively. This could also be expressed as follows:
$$
s = \frac{(\vec{r}_1-\vec{r}_0 \cdot \vec{r}-\vec{r}_0)}
{\sqrt{(\vec{r}_1-\vec{r}_0 \cdot \vec{r}_1-\vec{r}_0)}} \hieruit
$$ $$
\frac{(\vec{r}_1-\vec{r}_0 \cdot \vec{r}-\vec{r}_1)}
{\sqrt{(\vec{r}_1-\vec{r}_0 \cdot \vec{r}_1-\vec{r}_0)}} =
\frac{(\vec{r}_1-\vec{r}_0 \cdot \vec{r}-\vec{r}_0)}
{\sqrt{(\vec{r}_1-\vec{r}_0 \cdot \vec{r}_1-\vec{r}_0)}} -
\frac{(\vec{r}_1-\vec{r}_0 \cdot \vec{r}_1-\vec{r}_0)}
{\sqrt{(\vec{r}_1-\vec{r}_0 \cdot \vec{r}_1-\vec{r}_0)}} = s - S
$$
Where $S = \sqrt{(\vec{r}_1-\vec{r}_0 \cdot \vec{r}_1-\vec{r}_0)}$ is the total
length of the segment. Thinking in this way results in a term:
$$
\left[ \erf(s) - \erf(s-S) \right]
$$
The difference of the two error functions assumes the value $1$ for most of the
line segment $L$. The $\erf()$ part assumes appreciably different values only
in the neighbourhood of the start- and endpoints. That is, if the projection of
the point in the plane upon the segment $l$ gives rise to a distance, measured
along the segment, of less than a few times the spread, from the end-points
($\vec{r}_0,\vec{r}_1$). This is one reason why the term with the $\erf()$
functions is relatively less important and can be set to $1$ in many cases.
To put it in different terms, instead of integrating the line segment over its
finite length, it could be decided to extend the integration interval
to infinity. This corresponds with $(s,s-S) = (+\infty,-\infty)$.
For these values of $s$, it is known that $\erf(s) = 1$ and $\erf(s-S) = 0$.
With infinite length, only the length independent part of the problem is left.
However, in order to get rid of the $\erf()$ terms, there is no need to go all
the way to infinity. Instead, it is sufficient to restrict the area of interest
to a domain which is sufficiently far away from the end-points of the straight
line segments. Here, sufficiently far away may be conveniently defined as
a couple of times the value of the spread. A nice (and easy to remember) value
is with $2\pi$ :
$$
2\pi\sigma \hieruit e^{-\half(2\pi\sigma)^2/\sigma^2} = e^{-2\pi^2}
( \; \approx 2.67528799107424\:.\:10^{-9} \; )
$$
One way to accomplish things is to augment the area of interest with a kind of
sufficiently wide margin, where the width of the margin may be equal to,
for example, the above $2\pi\sigma$ . Anyway, it's not very difficult to
eliminate, in practice, the factor with the $\erf()$ terms in it.
And we find the fuzzyfication of a straight line, unfinished, unclipped:
$$
L(x,y) = \frac{D}{\sigma\sqrt{2\pi}} \; . \; e^{-\half\left\{
\left| (\vec{r}_1-\vec{r}_0) \times (\vec{r}-\vec{r}_0)\right|^2
/ (\vec{r}_1-\vec{r}_0 \cdot \vec{r}_1-\vec{r}_0) \right\} / \sigma^2}
$$ Or: $$
L(x,y) = \frac{D}{\sigma\sqrt{2\pi}} \; . \; e^{-\half (B/\sigma)^2}
$$
Where:
$$
B = \frac{ \left| (x-x_0)(y_1-y_0) - (x_1-x_0)(y-y_0) \right| }
{ \sqrt{(x_1-x_0)^2 + (y_1-y_0)^2 }}
$$
A lucid interpretation for the latter quantity does also exist.
The nominator is equal to the absolute value of the outer product
$(\vec{r}_1-\vec{r}_0) \times (\vec{r}-\vec{r}_0)$ . This, in turn, is equal
to the area of the paralellogram which is spanned by the vectors
$(\vec{r}_1-\vec{r}_0)$ and $(\vec{r}-\vec{r}_0)$ . The paralellogram can be
divided in two congruent triangles: $(\vec{r}_0,\vec{r}_1,\vec{r})$ and
$(\vec{r},\vec{r}_1,\vec{r}_1+\vec{r}-\vec{r}_0)$. These two triangles divide
the area of the paralellogram in two equal halves. Each of the two halves is
equal to half the height $H$ of the triangles times the length of the line
segment. Formally:
$$
\half H . \left| \vec{r}_1 - \vec{r}_0 \right| = \half
\left| (\vec{r}_1-\vec{r}_0) \times (\vec{r}-\vec{r}_0) \right|
\hieruit
H = \frac{\left| (\vec{r}_1-\vec{r}_0) \times (\vec{r}-\vec{r}_0) \right|}
{\left| \vec{r}_1 - \vec{r}_0 \right|}
$$
The height $H$ of the triangle $(\vec{r}_0,\vec{r}_1,\vec{r})$ is precisely the
length of the perpendicular from top $\vec{r}$ to base $(\vec{r}_0,\vec{r}_1)$.
With other words, it is precisely the distance from a point $(x,y)$ to
the line segment $(x_0,y_0)-(x_1,y_1)$. Herewith we can write, less formally,
for the fuzzyness of a straight line without the end-points:
$$
L(x,y) \sim \frac{\mbox{thickness}}{\mbox{spread}}
e^{-\half \left(\mbox{distance}/\mbox{spread}\right)^2}
$$
Still another way of looking at the above is the following. First repeat:
$$
B = \frac{ \left| (x-x_0)(y_1-y_0) - (x_1-x_0)(y-y_0) \right| }
{ \sqrt{(x_1-x_0)^2 + (y_1-y_0)^2 }}
$$
The unit normal $(n_x,n_y)$ of the line $(x-x_0)(y_1-y_0)-(x_1-x_0)(y-y_0)=0$
is recognized herein:
$$
\left[ \begin{array}{c} n_x \\ n_y \end{array} \right] =
\frac{1}{\sqrt{(x_1-x_0)^2 + (y_1-y_0)^2}}
\left[ \begin{array}{c} +(y_1-y_0) \\ -(x_1-x_0) \end{array} \right]
= \left[ \begin{array}{c} cos(\theta) \\ sin(\theta) \end{array} \right]
$$
Here $\theta$ is the angle of the normal of the straight line segment
with the x-axis.
The distance of a point $(x,y)$ to the line $B = 0$ is precisely the length of
the projection of $(x-x_0,y-y_0)$ on the normal $(cos(\theta), sin(\theta))$ ,
which is just another (and easier) way to obtain the above results again.
This results in a slightly different expression for the exponent in the
exponential:
$$
B = cos(\theta)(x-x_0) + sin(\theta)(y-y_0) \hieruit
$$ $$
L(x,y) = \frac{D}{\sigma\sqrt{2\pi}} \; . \; e^{-\half\left[
cos(\theta)(x-x_0) + sin(\theta)(y-y_0) \right]^2 / \sigma^2}
$$
So far so good.
What will happen if we integrate the complete function $L(x,y)$, of the finite
line segment, with the end-points, over the whole plane ? It is rather
advantageous then to replace the infinitesimal volume $dx\,dy$ by another
infinitesimal volume $ds\,dH$, where $H$ is the distance to the line and $s$
is the length of the arc measured along the line. The Jacobian determinant
corresponding with this orthogonal coordinate transformation is just $1$. And:
$$
\spekhaken L(x,y) \: dx\,dy = \spekhaken L(s,H) \: ds\,dH =
$$ $$
\int_{0}^{S} \left[ \erf(s) - \erf(s-S) \right] \; ds \; . \;
\frac{D}{\sigma\sqrt{2\pi}}
\int_{-\infty}^{+\infty} e^{-\half H^2/\sigma^2} \; dH
= S . D
$$
That the first integral is indeed equal to $S$ can be demonstrated with help of
a suitable picture of the $\erf()$ functions. The outcome of the latter integral
is well known from the theory of normal distributions. Anyway, the result is:
length times width, which simply is the area (or number of pixels eventually)
occupied by the line segment.
A normalized line shall be defined with a thickness $D$ equal to unity
and a length $S$ marginally extending to infinity. This is our end-result:
$$
L(x,y) = \frac{1}{\sigma\sqrt{2\pi}} \; . \; e^{-\half\left[
cos(\theta)(x-x_0) + sin(\theta)(y-y_0) \right]^2 / \sigma^2}
$$