Home | About | Journals | Submit | Contact Us | Français |

**|**Front Comput Neurosci**|**v.4; 2010**|**PMC3001749

Formats

Article sections

- Abstract
- Introduction
- Materials and Methods
- Alternative Approach for Testing Crossing of Line Pieces
- Results
- Discussion
- Conflict of Interest Statement
- References

Authors

Related links

Front Comput Neurosci. 2010; 4: 148.

Published online 2010 November 29. doi: 10.3389/fncom.2010.00148

PMCID: PMC3001749

Jaap van Pelt,^{1,}^{*} Andrew Carnell,^{1} Sander de Ridder,^{1} Huibert D. Mansvelder,^{1} and Arjen van Ooyen^{1}

Edited by: Luciano Da F. Costa, University of Sao Paulo, Brazil

Reviewed by: Francisco A. Rodrigues, University of Sao Paulo, Brazil; Herbert Jelinek, Charles Sturt University, Australia; Claus Hilgetag, Jacobs University Bremen, Germany; Marconi Soares Barbosa, University of Sao Paulo, Brazil

*Correspondence: Jaap van Pelt, Computational Neuroscience Group, Department of Integrative Neurophysiology, Center for Neurogenomics and Cognitive Research, Vrije Universiteit Amsterdam, De Boelelaan 1085, 1081 HV Amsterdam, Netherlands. e-mail: ln.uv.rcnc@tlep.nav.paaj

Received 2010 June 16; Accepted 2010 November 1.

Copyright © 2010 van Pelt, Carnell, de Ridder, Mansvelder and van Ooyen.

This is an open-access article subject to an exclusive license agreement between the authors and the Frontiers Research Foundation, which permits unrestricted use, distribution, and reproduction in any medium, provided the original authors and source are credited.

This article has been cited by other articles in PMC.

Neurons make synaptic connections at locations where axons and dendrites are sufficiently close in space. Typically the required proximity is based on the dimensions of dendritic spines and axonal boutons. Based on this principle one can search those locations in networks formed by reconstructed neurons or computer generated neurons. Candidate synapses are then located where axons and dendrites are within a given criterion distance from each other. Both experimentally reconstructed and model generated neurons are usually represented morphologically by piecewise-linear structures (line pieces or cylinders). Proximity tests are then performed on all pairs of line pieces from both axonal and dendritic branches. Applying just a test on the distance between line pieces may result in local clusters of synaptic sites when more than one pair of nearby line pieces from axonal and dendritic branches is sufficient close, and may introduce a dependency on the length scale of the individual line pieces. The present paper describes a new algorithm for defining locations of candidate synapses which is based on the crossing requirement of a line piece pair, while the length of the orthogonal distance between the line pieces is subjected to the distance criterion for testing 3D proximity.

Activity dynamics underlying cognition depends crucially on the patterns and strengths of synaptic connections between neurons. During development neurons grow out by elongation and branching of dendritic and axonal arbors. Synaptic connections can form when axonal and dendritic branches of neurons come sufficiently close to each other (Peters, 1979). The geometry of neuronal arborizations is therefore an important determinant of synaptic connectivity. How neuronal morphology shapes neuronal network connectivity is, however, still poorly understood. New developments in experimental and computational approaches make it now possible to shed light on this question. With multi-patch techniques experimentalists are now measuring connectivities between the patched neurons using electrophysiological and anatomical criteria (e.g., Feldmeyer et al., 1999, 2002, 2006; Le Bé et al., 2007; Frick et al., 2008). Computational approaches make it possible to assemble a number of neurons (reconstructed or algorithmically generated) in a 3D geometrical arrangement and to study the emerging synaptic connectivity by searching the sites where potential synapses may occur. For instance, neuroConstruct (Gleeson et al., 2007) is a modeling tool for creating neuronal networks in 3D space using imported neuronal morphologies. The simulator L-Neuron creates virtual neurons using an L-systems approach by iteratively sampling experimental distributions of neuronal shape parameters (Senft and Ascoli, 1999; Ascoli and Krichmar, 2000; Samsonovich and Ascoli, 2007). Similarly, the simulator tool NeuGen (Eberhard et al., 2006) generates neuronal networks in 3D with morphologically realistic neurons by sampling experimental distributions of morphological shape parameters. Recently, Luczak (2006) generates neuronal morphologies using a diffusion limited aggregation (DLA) approach. The simulator CX3D (Zubler and Douglas, 2009) aims at simulating cortical development in 3D space, including the morphology of single neurons. Cuntz et al. (2010) apply a minimal spanning tree principle in generating neuronal morphologies. Costa and Coelho (2005, 2008) generate 2D neuronal morphologies by statistically sampling a probabilistic model of neuronal geometry based on branch probabilities per branch level using a Monte Carlo approach, and form connections when neuronal trees overlap in 2D. The simulator NETMORPH (Koene et al., 2009) is based on biological growth principles of neurons by stochastically modeling the elongation and branching of growth cones in developmental time.

Spatial closeness between axonal and dendritic branches, typically determined by the dimensions of dendritic spines and axonal boutons, is considered as a prerequisite for synapse formation. Hellwig (2000) used reconstructed neurons for estimating connectivity between overlapping dendritic and axonal arborizations. To this end reconstructed neurons were transformed into voxel fields (with voxels of 1 μm side length) followed by counting the number of voxels containing both axonal and dendritic elements and obtaining a number of potential synaptic sites, thus adopting a distance criterion of 1μm. Kalisman et al. (2003) used sets of 3D reconstructions of biocytin-stained cells to obtain axonal and dendritic statistical representations in order to calculate the probabilities of close appositions. Stepanyants et al. (2002) and Stepanyants and Chklovskii (2005) estimated the number of potential synaptic sites in terms of axonal and dendritic length densities per unit volume, typical dendritic spine length and average angle between axonal and dendritic branches. Amirikian (2005) used the concept of synaptic clouds (density fields) as representation of the complex structure of axonal/dendritic arbors for studying connectivity between different cell classes.

With the recently developed simulator NETMORPH, assemblies of neurons can be generated with realistic 3D morphologies and realistic morphological variability in any arbitrary 3D arrangement (Koene et al., 2009). The emerging connectivity in these networks can be determined by searching the locations where axons and dendrites are sufficient close to each other for synapse formation, thus identifying the sites of candidate synapses. Both in experimentally reconstructed neurons and in algorithmically generated neurons (such as by NETMORPH) axons and dendrites are approximated by piecewise-linear structures, i.e., represented by chains of line pieces or cylinders. Testing the proximity of axonal and dendritic branches then implies the search for pairs of individual dendritic and axonal line pieces that are closer to each other than a given criterion distance. When an axonal and dendritic branch are sufficiently close in space, the application of just a distance criterion, however, may result in several pairs of nearby line pieces obeying the proximity criterion and thus may fall into a cluster of candidate synaptic sites (see Figure Figure1B).1B). In addition, the number of sufficiently close line piece pairs appears to depend on the typical length scale of the line pieces in the dendritic and axonal representation. As the clustering and the length scale dependency were considered to be artifacts of this approach a method was needed to identify uniquely the location where an axonal and dendritic branch are closest in space. To this end an additional requirement was introduced by searching for that line piece pair from an axonal and dendritic chain of line pieces that cross in space and taking the shortest (orthogonal) distance for that pair as the shortest distance between the axonal and dendritic branch (see Figure Figure1C).1C). This shortest distance is subsequently subjected to the distance criterion for candidate synapses. Note that in the case of cylinders the distance is taken between their axial center lines.

The characterization of network connectivity has also become an important area of research. Graph-theoretical studies of brain connectivity focus amongst others on the presence of hubs and small-world properties (e.g., Watts and Strogatz, 1998; Stepanyants et al., 2002; Hilgetag and Kaiser, 2004; Stepanyants and Chklovskii, 2005). Other studies emphasize the hierarchy in neural network connectivity (e.g., Kaiser et al., 2010) or different spatial scales (e.g., Passingham et al., 2002; Sporns et al., 2005; Stam and Reijneveld, 2007). An interesting aspect during development of network connectivity is the critical phenomenon of percolation when the largest cluster of connected neurons makes an abrupt transition in size toward a giant cluster as studied by Costa and Manoel (2002) and Costa and Coelho (2005, 2008), who also showed the dependence of this phenomenon on the morphology of the developing neurons. Many of these studies rely on methods for estimating synaptic connectivity between axonal and dendritic arborizations, underscoring the need for algorithms that estimate the connectivity as realistic as possible.

The paper describes an algorithm for testing the proximity between chains of line pieces on the basis of crossing properties of line piece pairs. The paper includes a Section “Materials and Methods” with the derivation of geometrical conditions for crossing line pieces using a classical geometry approach (applying a series of 3D transformations). In the Section “Results” the outcomes of the synapse detection model are shown without and with the crossing requirement. A study of the multiplicity of the connections (the number of synapses between two connected neurons) is included. The paper includes an “Rotations in 3D” of Appendix summarizing the 3D rotation matrices, “Relative Position of Point *D* of the Perpendicular From Point *C* to Opposite Side *AB* in a Triangle *ABC*” of Appendix with some basic triangular geometry, “Expressing the Crossing Conditions in Terms of the Original Coordinates” of Appendix formulating the crossing conditions in the Section “Crossing Line Pieces” in terms of the original coordinates, and “Summary of Calculations and Crossing Conditions” of Appendix summarizing the calculations and the crossing conditions. For reason of completeness, “Analytical Approach” of Appendix includes a different approach using analytical geometry and based on an algorithm taken from literature (Dan Sunday, http://softsurfer.com/Archive/algorithm_0106/algorithm_0106.htm), which also includes the shortest distance between non-crossing line pieces.

The search in a 3D network of neurons with complex axonal and dendritic arborizations for locations where axonal and dendritic branches are sufficiently close can proceed by searching the shortest distance between any two branches from the axonal and dendritic arborizations. The shortest distance between two straight infinite lines is at the site where they are crossing and determined by the length of the orthogonal connection line (Figure (Figure1A).1A). Axonal and dendritic branches in neuronal reconstructions, however, are not infinite straight lines, but composed of many line pieces in sequence with varying orientations and lengths. Then the distance between any line piece pair from the axonal and dendritic branch must be determined and tested against the criterion value. As illustrated in Figure Figure1B1B several pairs of nearby line pieces may meet the distance criterion resulting in a cluster of potential synaptic sites. In addition the number of “nearby” line pieces is dependent on the length scale of the line pieces which may influence the outcome for the number of potential sites (see Figure Figure1B).1B). This length scale in the piecewise-linear approximation of the neuronal morphological representation relates to morphological reconstruction procedures in experimental approaches, and to the time step parameter in computer simulation approaches.

To avoid clustering of candidate synaptic sites and length scale dependencies, a synapse allocation criterion was needed to identify uniquely locations where axon and dendrite chains of line pieces are closest to each other and where this shortest distance is smaller than the given criterion value. Extending the idea of the unique crossing point of infinite lines, it is proposed to search for the crossing point between an axon and dendrite chain of lines pieces. Such a crossing point can be searched for by testing the crossing condition for any pair of line pieces from the axon and the dendrite chain of line pieces and taking the orthogonal distance for this line piece pair to evaluate the distance condition (Figure (Figure11C).

Line pieces do cross when they are in a certain geometrical position to each other, i.e., when the projection of line piece (1) onto the plane through line piece (2) and parallel to (1) intersects line piece (2), as is illustrated in Figure Figure2B.2B. Only then can an orthogonal connection line be drawn whose length is the shortest distance between both line pieces. Figure Figure2A2A illustrates an arrangement of nearby, but non-crossing line pieces.

In the following an algorithm is introduced for testing whether or not two line pieces do cross. If they do, the algorithm provides the length of the orthogonal connection and the coordinates where this connection line intersects the two line pieces. Applying this algorithm to all pairs of line pieces of an axonal and dendritic branch will test the existence of a crossing pair, and whether the shortest distance in this pair meets the distance criterion.

Given are two line pieces *PQ* and *RS* and the coordinates of the points *P*(*x*, *y*, *z*), *Q*(*x*, *y*, *z*), *R*(*x*, *y*, *z*) and *S*(*x*, *y*, *z*). A “classical” geometry approach is used in which a series of 3D transformations is applied on the two line pieces in order to bring them in such a geometric arrangement that the condition for crossing can easily be applied. These transformations include one translation and three rotations around the three axes of the orthogonal coordinate system.

The translations proceed via *p*=*P*−*P*=*O*, *q*=*Q*−*P*, *r*=*R*−*P*, and *s*=*S*−*P*, see Figure Figure3,3, thus with

$$\begin{array}{cccc}\begin{array}{l}{p}_{x}=0\\ {p}_{y}=0,\\ {p}_{z}=0\end{array}& \begin{array}{l}{q}_{x}={Q}_{x}-{P}_{x}\\ {q}_{y}={Q}_{y}-{P}_{y},\\ {q}_{z}={Q}_{z}-{P}_{z}\end{array}& \begin{array}{l}{r}_{x}={R}_{x}-{P}_{x}\\ {r}_{y}={R}_{y}-{P}_{y},\\ {r}_{z}={R}_{z}-{P}_{z}\end{array}& \begin{array}{l}{s}_{x}={S}_{x}-{P}_{x}\\ {s}_{y}={S}_{y}-{P}_{y}\\ {s}_{z}={S}_{z}-{P}_{z}\end{array}\end{array}$$

(1)

The rotation around the *Z*-axis, see Figure Figure4,4, proceeds via _{1}*q*=*Rot*_{Z} (γ) • *q* or

$$\left(\begin{array}{c}{\text{\hspace{0.17em}}}_{1}{q}_{x}\\ {\text{\hspace{0.17em}}}_{1}{q}_{y}\\ {\text{\hspace{0.17em}}}_{1}{q}_{z}\end{array}\right)=\left(\begin{array}{ccc}\mathrm{cos}\gamma & -\mathrm{sin}\gamma & 0\\ \mathrm{sin}\gamma & \mathrm{cos}\gamma & 0\\ 0& 0& 1\end{array}\right)\times \left(\begin{array}{c}{q}_{x}\\ {q}_{y}\\ {q}_{z}\end{array}\right)$$

(2)

If δ equals the angle of the projection of *Oq* with the *x*-axis then the rotation angle γ is equal to −δ, thus

$$\begin{array}{l}\mathrm{cos}\gamma =\mathrm{cos}-\delta =\mathrm{cos}\delta =\frac{{q}_{x}}{l}\\ \mathrm{sin}\gamma =\mathrm{sin}-\delta =-\mathrm{sin}\delta =-\frac{{q}_{y}}{l}\end{array}$$

(3)

Here, *l* denotes the length of the projection of *Oq* onto the *XY*-plane with

$$l=\sqrt{{q}_{x}^{2}+{q}_{y}^{2}}=\sqrt{P{Q}^{2}-{q}_{z}^{2}}$$

(4)

with $PQ=\sqrt{{q}_{x}^{2}+{q}_{y}^{2}+{q}_{z}^{2}}$ denoting the length of line piece *PQ*

For the rotation equations we obtain

$$\begin{array}{l}{\text{\hspace{0.17em}}}_{1}{\text{q}}_{x}={q}_{x}.\mathrm{cos}\gamma -{q}_{y}.\mathrm{sin}\gamma =\frac{{q}_{x}^{2}+{q}_{y}^{2}}{l}=l\\ {\text{\hspace{0.17em}}}_{1}{q}_{y}={q}_{x}.\mathrm{sin}\gamma +{q}_{y}.\mathrm{cos}\gamma =\frac{-{q}_{x}{q}_{y}+{q}_{y}.{q}_{x}}{l}=0\\ {\text{\hspace{0.17em}}}_{1}{q}_{z}={q}_{z}\end{array}$$

(5)

By this rotation, point *q* is rotated into the *ZX*-plane making its *y*-coordinate equal to zero, and its *x*-coordinate equal to the length of the projection of *Oq* onto the *XY*-plane. Of course, the lengths of line pieces *O*_{1}*q* and *Oq* are equal to the length of the original line piece *PQ* (*O*_{1}*q*= *Oq*= *PQ*). The rotations of *r* and *s* toward _{1}*r* and _{1}*s* proceed via

$${\text{\hspace{0.17em}}}_{1}r=Ro{t}_{Z}(\gamma )\cdot r\text{\hspace{0.17em}and}{\text{\hspace{0.17em}}}_{1}s=Ro{t}_{Z}(\gamma )\cdot s,\text{}$$

(6)

respectively, and we obtain

$$\begin{array}{l}{\text{\hspace{0.17em}}}_{1}{r}_{x}={r}_{x}\cdot \mathrm{cos}\gamma -{r}_{y}\cdot \mathrm{sin}\gamma =\frac{{r}_{x}\cdot {q}_{x}+{r}_{y}\cdot {q}_{y}}{l}\\ {\text{\hspace{0.17em}}}_{1}{r}_{y}={r}_{x}\cdot \mathrm{sin}\gamma +{r}_{y}\cdot \mathrm{cos}\gamma =\frac{-{r}_{x}\cdot {q}_{y}+{r}_{y}\cdot {q}_{x}}{l}\\ {\text{\hspace{0.17em}}}_{1}{r}_{z}={r}_{z}\end{array}$$

(7)

and

$$\begin{array}{l}{\text{\hspace{0.17em}}}_{1}{s}_{x}={s}_{x}\cdot \mathrm{cos}\gamma -{s}_{y}\cdot \mathrm{sin}\gamma =\frac{{s}_{x}\cdot {q}_{x}+{s}_{y}\cdot {q}_{y}}{l}\\ {\text{\hspace{0.17em}}}_{1}{s}_{y}={s}_{x}\cdot \mathrm{sin}\gamma +{s}_{y}\cdot \mathrm{cos}\gamma =\frac{-{s}_{x}\cdot {q}_{y}+{s}_{y}\cdot {q}_{x}}{l}\\ {\text{\hspace{0.17em}}}_{1}{s}_{z}={s}_{z}\end{array}$$

(8)

The rotation around the *Y*-axis, see Figure Figure5,5, proceeds via _{2}*q*= *Rot _{Y}*(β).

$$\left(\begin{array}{c}\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}q{\text{\hspace{0.17em}}}_{x}\\ \text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}q{\text{\hspace{0.17em}}}_{y}\\ {\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}q{\text{\hspace{0.17em}}}_{z}\end{array}\right)=\left(\begin{array}{ccc}\mathrm{cos}\beta & 0& -\mathrm{sin}\beta \\ 0& 1& 0\\ \mathrm{sin}\beta & 0& \mathrm{cos}\beta \end{array}\right)\times \left(\begin{array}{c}\text{\hspace{0.17em}}{}_{1}\text{\hspace{0.17em}}q{\text{\hspace{0.17em}}}_{x}\\ \text{\hspace{0.17em}}{}_{1}\text{\hspace{0.17em}}q{\text{\hspace{0.17em}}}_{y}\\ {\text{\hspace{0.17em}}}_{1}\text{\hspace{0.17em}}q{\text{\hspace{0.17em}}}_{z}\end{array}\right)$$

(9)

If ε equals the angle of *O*_{1}*q* with the *x*-axis then the rotation angle β is equal to *-*ε, thus

$$\begin{array}{l}\mathrm{cos}\text{\hspace{0.17em}}\beta =\mathrm{cos}-\epsilon =\mathrm{cos}\epsilon =\frac{{\text{\hspace{0.17em}}}_{1}\text{\hspace{0.17em}}q{\text{\hspace{0.17em}}}_{x}}{O\text{\hspace{0.17em}}{}_{1}\text{\hspace{0.17em}}q}=\frac{l}{PQ}\\ \mathrm{sin}\text{\hspace{0.17em}}\beta =\mathrm{sin}-\epsilon =-\mathrm{sin}\epsilon =-\frac{\text{\hspace{0.17em}}{}_{1}\text{\hspace{0.17em}}q{\text{\hspace{0.17em}}}_{z}}{O{\text{\hspace{0.17em}}}_{1}\text{\hspace{0.17em}}q}=-\frac{q{\text{\hspace{0.17em}}}_{z}}{PQ}\end{array}$$

(10)

Thus:

$$\begin{array}{l}{\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}q{\text{\hspace{0.17em}}}_{x}{=}_{1}q{\text{\hspace{0.17em}}}_{x}.\mathrm{cos}\beta -{\text{\hspace{0.17em}}}_{1}\text{\hspace{0.17em}}q{\text{\hspace{0.17em}}}_{z}\cdot \mathrm{sin}\beta =\frac{{\text{\hspace{0.17em}}}_{1}q{\text{\hspace{0.17em}}}_{x}^{2}+{}_{1}q{\text{\hspace{0.17em}}}_{z}^{2}}{PQ}=PQ\\ {\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}q{\text{\hspace{0.17em}}}_{y}{=}_{1}q{\text{\hspace{0.17em}}}_{y}=0\\ {\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}q{\text{\hspace{0.17em}}}_{z}{=}_{1}q{\text{\hspace{0.17em}}}_{x}\cdot \mathrm{sin}\beta +{\text{\hspace{0.17em}}}_{1}\text{\hspace{0.17em}}q{\text{\hspace{0.17em}}}_{z}\cdot \mathrm{cos}\beta =0\end{array}$$

(11)

By this rotation, point *Q* is rotated onto the *X*-axis, thus giving point _{2}*q* zero *y*- and *z*-coordinates and making the *x*-coordinate equal to the length of line piece *PQ*.

The rotations of _{1}*r* and _{1}*s* toward _{2}*r* and _{2}*s* proceed similarly via

$${\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}r=Rot{\text{\hspace{0.17em}}}_{Y}(\beta )\cdot {\text{\hspace{0.17em}}}_{1}\text{\hspace{0.17em}}r\text{\hspace{0.17em}and\hspace{0.17em}}{\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}s=Rot{\text{\hspace{0.17em}}}_{Y}(\beta )\cdot {\text{\hspace{0.17em}}}_{1}\text{\hspace{0.17em}}s,$$

(12)

respectively, and we obtain

$$\begin{array}{l}{\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{x}{=}_{\text{\hspace{0.17em}}1}{r}_{\text{\hspace{0.17em}}x}\cdot \mathrm{cos}\beta -{\text{\hspace{0.17em}}}_{1}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}z}\cdot \mathrm{sin}\beta =\frac{{\text{\hspace{0.17em}}}_{1}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}x}\cdot l+{}_{1}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}z}\cdot \text{\hspace{0.17em}\hspace{0.17em}}{q}_{\text{\hspace{0.17em}}z}}{PQ}=\\ =\frac{r{\text{\hspace{0.17em}}}_{x}\cdot \text{\hspace{0.17em}\hspace{0.17em}}q{\text{\hspace{0.17em}}}_{x}+\text{\hspace{0.17em}\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{y}\cdot q{\text{\hspace{0.17em}}}_{y}+r{\text{\hspace{0.17em}}}_{z}\cdot q{\text{\hspace{0.17em}}}_{z}}{PQ}=\frac{r\cdot q}{PQ}=C{\text{\hspace{0.17em}}}_{R}\end{array}$$

(13)

using the expressions for _{1}*r*_{x} and _{1}*r*_{z}. Because the expression for _{2}*r*_{x} will occur frequently in following expressions we will assign it a special symbol *C*_{R}=_{2}*r*_{x}.

$${}_{2}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{y}={\text{\hspace{0.17em}}}_{1}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{y}=\frac{-\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{x}\cdot q{\text{\hspace{0.17em}}}_{y}+\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{y}\cdot \text{\hspace{0.17em}\hspace{0.17em}}{q}_{\text{\hspace{0.17em}}x}}{l}$$

(14)

$$\begin{array}{l}{\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{z}{=}_{\text{\hspace{0.17em}}1}r{\text{\hspace{0.17em}}}_{x}\cdot \mathrm{sin}\beta +{\text{\hspace{0.17em}}}_{1}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{z}\cdot \mathrm{cos}\beta =-\frac{{\text{\hspace{0.17em}}}_{1}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}x}\cdot q{\text{\hspace{0.17em}}}_{z}}{PQ}+\frac{\text{\hspace{0.17em}}{}_{1}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{z}\cdot \text{\hspace{0.17em}\hspace{0.17em}}l}{PQ}=\\ =-\frac{r{\text{\hspace{0.17em}}}_{x}\cdot q{\text{\hspace{0.17em}}}_{x}+r{\text{\hspace{0.17em}}}_{y}\cdot q{\text{\hspace{0.17em}}}_{y}}{l}\cdot \frac{q{\text{\hspace{0.17em}}}_{z}}{PQ}+\frac{r{\text{\hspace{0.17em}}}_{z}\cdot \text{\hspace{0.17em}\hspace{0.17em}}l}{PQ}=\\ =-\frac{r{\text{\hspace{0.17em}}}_{x}\cdot q{\text{\hspace{0.17em}}}_{x}+r{\text{\hspace{0.17em}}}_{y}\cdot q{\text{\hspace{0.17em}}}_{y}}{l}\cdot \frac{q{\text{\hspace{0.17em}}}_{z}}{PQ}+\frac{r{\text{\hspace{0.17em}}}_{z}\cdot PQ{\text{\hspace{0.17em}}}^{2}-r{\text{\hspace{0.17em}}}_{z}\cdot q{\text{\hspace{0.17em}}}_{z}^{2}}{l\cdot PQ}=\\ =-\frac{r{\text{\hspace{0.17em}}}_{x}\cdot q{\text{\hspace{0.17em}}}_{x}+r{\text{\hspace{0.17em}}}_{y}\cdot q{\text{\hspace{0.17em}}}_{y}+r{\text{\hspace{0.17em}}}_{z}\cdot q{\text{\hspace{0.17em}}}_{z}}{PQ}\cdot \frac{q{\text{\hspace{0.17em}}}_{z}}{l}+\frac{r{\text{\hspace{0.17em}}}_{z}\cdot PQ}{l}=\frac{-C{\text{\hspace{0.17em}}}_{R}\cdot q{\text{\hspace{0.17em}}}_{z}+PQ\cdot r{\text{\hspace{0.17em}}}_{z}}{l}\end{array}$$

(15)

using the expressions for _{1}*r*_{x} and _{1}*r*_{z}, followed by further elaboration. In a similar way we obtain for _{2}*s*

$$\begin{array}{l}\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}s{\text{\hspace{0.17em}}}_{x}=\frac{s{\text{\hspace{0.17em}}}_{x}\cdot q{\text{\hspace{0.17em}}}_{x}+s{\text{\hspace{0.17em}}}_{y}\cdot q{\text{\hspace{0.17em}}}_{y}+s{\text{\hspace{0.17em}}}_{z}\cdot q{\text{\hspace{0.17em}}}_{z}}{PQ}=C{\text{\hspace{0.17em}}}_{S}\\ \text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}s{\text{\hspace{0.17em}}}_{y}={\text{\hspace{0.17em}}}_{1}\text{\hspace{0.17em}}s{\text{\hspace{0.17em}}}_{y}=\frac{-s{\text{\hspace{0.17em}}}_{x}\cdot q{\text{\hspace{0.17em}}}_{y}+s{\text{\hspace{0.17em}}}_{y}\cdot q{\text{\hspace{0.17em}}}_{x}}{l}\\ \text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}s{\text{\hspace{0.17em}}}_{z}=\frac{-C{\text{\hspace{0.17em}}}_{S}\cdot q{\text{\hspace{0.17em}}}_{z}+PQ\cdot s{\text{\hspace{0.17em}}}_{z}}{l}\end{array}$$

(16)

Because also the expression for _{2}*s*_{x} will occur frequently in following expressions we have assigned it the special symbol *C*_{S}=_{2}*s*_{x}

With the original line piece *PQ* transformed to coincide with the *X*-axis, the final rotation will be around the *X*-axis in order to position the original line piece *RS* parallel to the *ZX*-plane (Figure (Figure66).

The rotation around the *X*-axis proceeds via _{3}*r*=*Rot*_{X} (α). _{2}*r* and _{3}*s*= *Rot*_{X}(α). _{2}*s* or

$$\begin{array}{l}\left(\begin{array}{c}\text{\hspace{0.17em}}{}_{3}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}x}\\ \text{\hspace{0.17em}}{}_{3}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}y}\\ \text{\hspace{0.17em}}{}_{3}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}z}\end{array}\right)=\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\alpha & -\mathrm{sin}\alpha \\ 0& \mathrm{sin}\alpha & \mathrm{cos}\alpha \end{array}\right)\times \left(\text{\hspace{0.17em}}\begin{array}{c}{}_{2}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}x}\\ {}_{2}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}y}\\ {}_{2}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}z}\end{array}\right)\text{\hspace{0.17em}}and\\ \left(\text{\hspace{0.17em}}\begin{array}{c}{}_{3}\text{\hspace{0.17em}}{s}_{\text{\hspace{0.17em}}x}\\ {}_{3}\text{\hspace{0.17em}}{s}_{\text{\hspace{0.17em}}y}\\ {}_{3}\text{\hspace{0.17em}}{s}_{\text{\hspace{0.17em}}z}\end{array}\right)=\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\alpha & -\mathrm{sin}\alpha \\ 0& \mathrm{sin}\alpha & \mathrm{cos}\alpha \end{array}\right)\times \left(\text{\hspace{0.17em}}\begin{array}{c}{}_{2}\text{\hspace{0.17em}}{s}_{\text{\hspace{0.17em}}x}\\ {}_{2}\text{\hspace{0.17em}}{s}_{\text{\hspace{0.17em}}y}\\ {}_{2}\text{\hspace{0.17em}}{s}_{\text{\hspace{0.17em}}z}\end{array}\right)\end{array}$$

(17)

Thus:

$$\text{\hspace{0.17em}}\begin{array}{ll}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{x}\text{\hspace{0.17em}}={\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{x}\text{\hspace{0.17em}}=\text{\hspace{0.17em}\hspace{0.17em}}C{\text{\hspace{0.17em}}}_{R}\hfill & \text{\hspace{0.17em}}s{\text{\hspace{0.17em}}}_{x}\text{\hspace{0.17em}}={\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}s{\text{\hspace{0.17em}}}_{x}\text{\hspace{0.17em}}=C{\text{\hspace{0.17em}}}_{S}\hfill \\ \text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{y}\text{\hspace{0.17em}}={\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{y}\cdot \text{\hspace{0.17em}\hspace{0.17em}}\mathrm{cos}\alpha \text{\hspace{0.17em}\hspace{0.17em}}-\text{\hspace{0.17em}\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{z}\cdot \mathrm{sin}\alpha \hfill & \text{and}\hfill & \text{\hspace{0.17em}}s{\text{\hspace{0.17em}}}_{y}\text{\hspace{0.17em}}={\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}s{\text{\hspace{0.17em}}}_{y}\cdot \mathrm{cos}\alpha -\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}\text{\hspace{0.17em}}s{\text{\hspace{0.17em}}}_{z}\cdot \mathrm{sin}\alpha \hfill \\ \text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{z}\text{\hspace{0.17em}}={\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{y}\cdot \mathrm{sin}\alpha +\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{z}\cdot \mathrm{cos}\alpha \hfill & \text{\hspace{0.17em}}s{\text{\hspace{0.17em}}}_{z}\text{\hspace{0.17em}}={\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}s{\text{\hspace{0.17em}}}_{y}\cdot \mathrm{sin}\alpha +\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}s{\text{\hspace{0.17em}}}_{z}\cdot \mathrm{cos}\alpha \hfill \end{array}$$

The rotation angle α can be obtained by the following geometrical considerations. Let _{2}*r*′_{2}*s*′ and _{3}*r*′_{3}*s*′ be the projections of _{2}*r*_{s}*s* and _{3}*r*_{3}*s* onto the *YZ*-plane. Evidently, ${\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}{{r}^{\prime}}_{y}={\text{\hspace{0.17em}}}_{2}{r}_{y},$ ${\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}{{r}^{\prime}}_{z}={\text{\hspace{0.17em}}}_{2}{r}_{z},$ ${\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}{{s}^{\prime}}_{y}=\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{s}_{y},$ and $\text{\hspace{0.17em}}{{s}^{\prime}}_{z}=\text{\hspace{0.17em}\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{s}_{z}.$The condition of equal and positive (as an arbitrary choice) *y*-coordinates implies a rotation over angle α equal to minus the angle δ of the perpendicular from *O* onto _{2}*r*′_{2}*s*′. Let this perpendicular end in point *V* (Figure (Figure6B).6B). The coordinates of point *V* can be obtained by calculating its relative position on _{2}*r*′_{2}*s*′ (*f*(*V*|_{2}*r*′_{2}*s*′)) or in short notation (*f*_{v}). Following elementary geometry (see Relative Position of Point *D* of the Perpendicular from Point *C* to Opposite Side *AB* in a Triangle *ABC* of Appendix) we obtain

$${f}_{V}=f(V|{}_{2}{r}^{\prime}{}_{2}{s}^{\prime})=\frac{{l}_{{r}^{\prime}V}}{{l}_{{r}^{\prime}{}_{2}{s}^{\prime}}}=\frac{{l}_{{O}_{2}{r}^{\prime}}^{2}-{l}_{O{}_{2}{s}^{\prime}}^{2}+{l}_{{{r}^{\prime}}_{2}{s}^{\prime}}^{2}}{2\cdot {l}_{{{r}^{\prime}}_{2}{s}^{\prime}}^{2}}=\frac{1}{2}\cdot \frac{{l}_{{O}_{2}{r}^{\prime}}^{2}-{l}_{O{}_{2}{s}^{\prime}}^{2}}{{l}_{{{r}^{\prime}}_{2}{s}^{\prime}}^{2}}+\frac{1}{2}$$

with

$$\begin{array}{l}{l}_{{O}_{2}{r}^{\prime}}^{2}={\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}{r}_{y}^{2}+\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{r}_{z}^{2}\\ {l}_{{O}_{2}{s}^{\prime}}^{2}{=}_{2}{s}_{y}^{2}+{}_{2}s{\text{\hspace{0.17em}}}_{z}^{2}\\ {l}_{{}_{2}{r}^{\prime}{s}^{\prime}}^{2}=(\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}y}-{\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}{s}_{\text{\hspace{0.17em}}y}){\text{\hspace{0.17em}}}^{2}\text{\hspace{0.17em}}+(\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}z}-\text{\hspace{0.17em}}{}_{\text{\hspace{0.17em}}2}\text{\hspace{0.17em}}{s}_{\text{\hspace{0.17em}}z}){\text{\hspace{0.17em}}}^{2}\end{array}$$

(18)

the squared length of the projections of the respective line pieces in the *YZ*-plane. With the fraction *f*_{v} the *y*- and *z*-coordinates of point *V* can be calculated as

$$\begin{array}{l}{V}_{\text{\hspace{0.17em}}y}={\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}{{r}^{\prime}}_{\text{\hspace{0.17em}}y}+f{}_{V}\cdot (\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{{s}^{\prime}}_{\text{\hspace{0.17em}}y}-{\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}{{r}^{\prime}}_{\text{\hspace{0.17em}}y})\text{\hspace{0.17em}}={\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}y}+f{}_{V}\cdot (\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{s}_{\text{\hspace{0.17em}}y}-{\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}y})\\ {V}_{\text{\hspace{0.17em}}z}={\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}{{r}^{\prime}}_{\text{\hspace{0.17em}}z}\text{\hspace{0.17em}\hspace{0.17em}}+f{}_{V}\cdot (\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{{s}^{\prime}}_{\text{\hspace{0.17em}}z}-{\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}{{r}^{\prime}}_{\text{\hspace{0.17em}}z})={\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}z}\text{\hspace{0.17em}\hspace{0.17em}}+f{}_{V}\cdot (\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}s{\text{\hspace{0.17em}}}_{z}-{\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}{r}_{\text{\hspace{0.17em}}z})\end{array}$$

(19)

When both line pieces *PQ* and *RS* are in one plane and are running parallel, then line piece _{2}*r*_{2}*s* runs parallel to the *X*-axis, the projection points _{2}*r*′ and _{2}*s*′ coincide and the length ${l}_{{}_{2}{r}^{\prime}{s}^{\prime}}$ is zero. Then the coordinates *V*_{y} and *V*_{z} coincide with those of _{2}*r*′ and _{2}*s*′

$$\begin{array}{cc}{V}_{y}{=}_{2}{r}_{\prime}^{y}={}_{2}{s}_{y}^{\prime},& {V}_{z}{=}_{2}{r}_{z}^{\prime}={}_{2}{s}_{z}^{\prime}\end{array}$$

(20)

With the length of the line piece $OV({l}_{OV}=\sqrt{{V}_{y}^{2}+{V}_{z}^{2}}),$ the orientation angle δ of line piece *OV* is obtained as

$$\mathrm{sin}\delta =\frac{{V}_{z}}{\sqrt{{V}_{y}^{2}+{V}_{z}^{2}}}=\frac{{V}_{z}}{{l}_{OV}},\text{\hspace{0.17em}and\hspace{0.17em}}\mathrm{cos}\delta =\frac{{V}_{y}}{\sqrt{{V}_{y}^{2}+{V}_{z}^{2}}}=\frac{{V}_{y}}{{l}_{OV}}$$

(21)

Concerning the rotation angle α, vector *OV* needs to be rotated toward the positive *Y*-axis implicating a rotation over −δ, thus

$$\begin{array}{l}\mathrm{sin}\alpha =\mathrm{sin}-\delta =-\mathrm{sin}\delta =-\frac{{V}_{z}}{{l}_{OV}}\\ \mathrm{cos}\alpha =\mathrm{cos}-\delta =\mathrm{cos}\delta =\frac{{V}_{y}}{{l}_{OV}}\end{array}$$

(22)

The rotations in Eq. 17 _{3}*r*=*Rot*_{X} (α). _{2}*r* and _{3}*s*= *Rot*_{X}(α). _{2}*s* can now be made explicit as

$$\begin{array}{l}{\text{\hspace{0.17em}}}_{3}{r}_{x}{=}_{2}{r}_{x}={C}_{R}\\ {\text{\hspace{0.17em}}}_{3}{r}_{y}{=}_{2}{r}_{y}\cdot \mathrm{cos}\alpha -{}_{2}{r}_{z}\cdot \mathrm{sin}\alpha =\\ =\frac{1}{{l}_{OV}}\cdot \left({}_{2}{r}_{y}\cdot {V}_{y}+{}_{2}{r}_{y}\cdot {V}_{z}\right)=\\ =\frac{{V}_{y}\cdot \left[-{r}_{x}\cdot {q}_{y}+{r}_{y}\cdot {q}_{x}\right]-{V}_{z}\cdot \left[-{C}_{R}\cdot {q}_{z}+PQ\cdot {r}_{z}\right]}{l\cdot {l}_{OV}}\\ {}_{3}{r}_{z}{=}_{2}{r}_{y}\cdot \mathrm{sin}\alpha +{}_{2}{r}_{z}\cdot \mathrm{cos}\alpha \\ =\frac{1}{{l}_{OV}}\cdot \left({}_{2}{r}_{y}\cdot -{V}_{z}+{}_{2}{r}_{z}\cdot {V}_{.}\right)=\\ \frac{-{V}_{z}\cdot \left[-{r}_{x}\cdot {q}_{y}+{r}_{y}\cdot {q}_{x}\right]+{V}_{y}\cdot \left[-{C}_{R}\cdot {q}_{z}+PQ\cdot {r}_{z}\right]}{l\cdot {l}_{OV}}\end{array}$$

(23)

and similarly

$$\begin{array}{l}{}_{3}{s}_{x}{=}_{2}{s}_{x}={C}_{S}\\ {}_{3}{s}_{y}{=}_{2}{s}_{y}\cdot \mathrm{cos}\alpha -{}_{2}{s}_{z}\cdot \mathrm{sin}\alpha =\frac{1}{{l}_{OV}}\cdot \left({}_{2}{s}_{y}\cdot {V}_{y}+{}_{2}{s}_{z}\cdot {V}_{z}\right)\\ =\frac{{V}_{y}\cdot \left[-{s}_{x}\cdot {q}_{y}+{s}_{y}\cdot {q}_{x}\right]-{V}_{z}\cdot \left[-{C}_{S}\cdot {q}_{z}+PQ\cdot {s}_{z}\right]}{l\cdot {l}_{OV}}\\ {}_{3}{s}_{z}{=}_{2}{s}_{y}\cdot \mathrm{sin}\alpha +{}_{2}{s}_{z}\cdot \mathrm{cos}\alpha =\frac{1}{{l}_{OV}}\cdot \left({}_{2}{s}_{y}\cdot -{V}_{z}+{}_{2}{s}_{z}\cdot {V}_{y}\right)\\ =\frac{-{V}_{z}\cdot \left[-{s}_{x}\cdot {q}_{y}+{s}_{y}\cdot {q}_{x}\right]+{V}_{y}\cdot \left[-{C}_{S}\cdot {q}_{z}+PQ\cdot {s}_{z}\right]}{l\cdot {l}_{OV}}\end{array}$$

(24)

By the rotation the points _{3}*r* and _{3}*s* have obtained equal *y*-coordinates.

When both line pieces *PQ* and *RS* are in one plane but not parallel they (or their elongations) have an intersection point, the line piece _{2}*r*′_{2}*s*′ has an orientation through the origin (i.e., the line piece _{2}*r*′_{2}*s*′ or its elongation intersects the *X*-axis), and the length of line piece *OV* is equal to zero. Then the projections of both points have equal ratios for their *Z*- and *Y*-coordinates

$$\text{\hspace{0.17em}}\frac{\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{{r}^{\prime}}_{\text{\hspace{0.17em}}z}}{{}_{2}\text{\hspace{0.17em}}{{r}^{\prime}}_{\text{\hspace{0.17em}}y}}\text{\hspace{0.17em}\hspace{0.17em}}=\text{\hspace{0.17em}\hspace{0.17em}}\frac{\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{{s}^{\prime}}_{\text{\hspace{0.17em}}z}}{{}_{2}\text{\hspace{0.17em}}{{s}^{\prime}}_{\text{\hspace{0.17em}}y}}$$

The orientation of the perpendicular to line piece _{2}*r*′_{2}*s*′ is then given by

$$\begin{array}{l}\mathrm{sin}(90+\delta )=\mathrm{cos}\delta =\frac{\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{{r}^{\prime}}_{\text{\hspace{0.17em}}y}}{{l}_{O{}_{2}{r}^{\prime}}}=\frac{-\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{{s}^{\prime}}_{\text{\hspace{0.17em}}y}}{{l}_{O{}_{2}{s}^{\prime}}}\\ \mathrm{cos}(90+\delta )=-\mathrm{sin}\delta =\frac{\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{{r}^{\prime}}_{\text{\hspace{0.17em}}z}}{{l}_{O{}_{2}{r}^{\prime}}}=\frac{-\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{{s}^{\prime}}_{\text{\hspace{0.17em}}z}}{{l}_{O{}_{2}{s}^{\prime}}}\end{array}$$

(25)

such that

$$\begin{array}{l}\mathrm{sin}\alpha =\mathrm{sin}-\delta =-\mathrm{sin}\delta =\frac{\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{{r}^{\prime}}_{\text{\hspace{0.17em}}y}}{{l}_{O{}_{2}{r}^{\prime}}}=-\frac{\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{{s}^{\prime}}_{\text{\hspace{0.17em}}y}}{{l}_{O{}_{2}{s}^{\prime}}}\\ \mathrm{cos}\alpha =\mathrm{cos}-\delta =\mathrm{cos}\delta =\frac{\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{{r}^{\prime}}_{\text{\hspace{0.17em}\hspace{0.17em}}z}}{{l}_{O{}_{2}{r}^{\prime}}}=-\frac{\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{{s}^{\prime}}_{\text{\hspace{0.17em}\hspace{0.17em}}z}}{{l}_{O{}_{2}{s}^{\prime}}}\end{array}$$

(26)

Thus for non-parallel line pieces in one plane, the rotations in Eq. 17 _{3}*r*=*Rot _{X}*(α).

$$\begin{array}{l}{}_{3}{r}_{x}{=}_{2}{r}_{x}={C}_{R}\\ {}_{3}{r}_{y}{=}_{2}{r}_{y}\cdot \mathrm{cos}\alpha -{}_{2}{r}_{z}\cdot \mathrm{sin}\alpha =\frac{{}_{2}{r}_{y}\cdot {}_{2}{r}_{z}^{\prime}-{}_{2}{r}_{z}\cdot {}_{2}{r}_{y}^{\prime}}{{l}_{O{}_{2}{r}_{y}^{\prime}}}=0\\ {}_{3}{r}_{z}={}_{2}{r}_{y}\cdot \mathrm{sin}\alpha +{}_{2}{r}_{z}\cdot \mathrm{cos}\alpha =\frac{{}_{2}{r}_{y}\cdot {}_{2}{r}_{y}^{\prime}+{}_{2}{r}_{z}\cdot {}_{2}{r}_{z}^{\prime}}{{l}_{O{}_{2}{r}^{\prime}}}\\ =\frac{{}_{2}{r}_{y}^{2}+{}_{2}{r}_{z}^{2}}{{l}_{O{}_{2}{r}^{\prime}}}=\frac{{l}_{O{}_{2}{r}^{\prime}}^{2}}{{l}_{O{}_{2}{r}^{\prime}}}={l}_{O{}_{2}{r}^{\prime}}\end{array}$$

(27)

and similarly

$$\begin{array}{l}{}_{3}{s}_{x}{=}_{2}{s}_{x}={C}_{S}\\ {}_{3}{s}_{y}{=}_{2}{s}_{y}\cdot \mathrm{cos}\alpha -{}_{2}{s}_{z}\cdot \mathrm{sin}\alpha =\frac{{}_{2}{s}_{y}\cdot -{}_{2}{s}_{z}^{\prime}-{}_{2}{s}_{z}\cdot -{}_{2}{s}_{y}^{\prime}}{{l}_{O{}_{2}{s}^{\prime}}}=0\\ {}_{3}{s}_{z}{=}_{2}{s}_{y}\cdot \mathrm{sin}\alpha +{}_{2}{s}_{z}\cdot \mathrm{cos}\alpha =\frac{{}_{2}{s}_{y}\cdot -{}_{2}{s}_{y}^{\prime}+{}_{2}{s}_{z}\cdot -{}_{2}{s}_{z}^{\prime}}{{l}_{O{}_{2}{s}^{\prime}}}\\ =\frac{-{}_{2}{s}_{y}^{2}-{}_{2}{s}_{z}^{2}}{{l}_{O{}_{2}{s}^{\prime}}}=\frac{-{l}_{O{}_{2}{s}^{\prime}}^{2}}{{l}_{O{}_{2}{s}^{\prime}}}=-{l}_{O{}_{2}{s}^{\prime}}\end{array}$$

(28)

After the series of transformations the line pieces *O*_{3}*q* and _{3}*r*_{3}*s* are in the geometrical positions of *O*_{3}*q* coinciding with the *X*-axis, and _{3}*r*_{3}*s* running parallel to the *ZX*-plane (Figure (Figure77).

Now it can easily be determined whether they are crossing. With _{3}*r*_{3}*s* running parallel to the *ZX*-plane, its projection _{3}*r*′_{3}*s*′ onto the *XY*-plane runs parallel to the *X*-axis. If (A) _{3}*r*_{3}*s* intersects the *XY*-plane, and (B) if this intersection point *u* of _{3}*r*_{3}*s* with the *XY*-plane has an *x*-coordinate within the length of _{3}*p*_{3}*q* (_{3}*p*_{x}≤*u*_{x}≤_{3}*q*_{x}) then *O*_{3}*q* and _{3}*r*_{3}*s* are crossing line pieces and the perpendicular line of *u* onto *X*-axis *ut* is the orthogonal shortest distance between the line pieces.

*Condition A*: Line piece _{3}*r*_{3}*s* crosses the *XY*-plane if the product of the *z*-coordinates of _{3}*r* and _{3}*s* is negative or if one or both of them equals zero, thus if

$${}_{3}{r}_{z}\cdot {}_{3}{s}_{z}\le 0$$

(29)

If both coordinates are zero, line piece _{3}*r*_{3}*s* runs parallel to *O*_{3}*q* and is in the *XY*-plane. If one of the coordinates is zero, line piece _{3}*r*_{3}*s* has one point in the *XY*-plane.

*Condition B requires first (B1)* an overlap of *x*-coordinates of *O*_{3}*q* and _{3}*r*_{3}*s*, thus when

$$\begin{array}{l}{}_{3}{r}_{x}>0\text{\hspace{0.17em}and\hspace{0.17em}}{}_{3}{s}_{x}<{}_{3}{q}_{x},\text{\hspace{0.17em}when\hspace{0.17em}}{}_{3}{r}_{x}>{}_{3}{s}_{x}\\ \text{or}\\ {}_{3}{s}_{x}>0\text{\hspace{0.17em}and\hspace{0.17em}}{}_{3}{r}_{x}<{}_{3}{q}_{x},\text{\hspace{0.17em}when\hspace{0.17em}}{}_{3}{s}_{x}>{}_{3}{r}_{x}\end{array}$$

(30)

As *O*_{3}*q* originates from the transformed line piece *PQ* its length equals that of *PQ*, thus _{3}*q*_{x}=*PQ*. Using the symbols *C*_{R} and *C*_{S}, Eq. 30 can also be phrased as

$$\begin{array}{l}{C}_{R}>0\text{\hspace{0.17em}and\hspace{0.17em}}{C}_{R}<PQ,\text{\hspace{0.17em}when\hspace{0.17em}}{C}_{R}>{C}_{S}\\ \text{or}\\ {C}_{S}>0\text{\hspace{0.17em}and\hspace{0.17em}}{C}_{R}<PQ,\text{\hspace{0.17em}when\hspace{0.17em}}{C}_{S}>{C}_{R}\end{array}$$

(30a)

If both conditions (*A*) and (*B1*) are fulfilled the perpendicular distance from intersection point *u* of _{3}*r*_{3}*s* with the *XY*-plane to the point *t* on the line piece *O*_{3}*q* can be determined as

$$\frac{{u}_{x}-{}_{3}{s}_{x}}{{u}_{x}-{}_{3}{r}_{x}}=\frac{{}_{3}{s}_{z}}{{}_{3}{r}_{z}}$$

with

$${u}_{x}=\frac{{}_{3}{r}_{z}\cdot {}_{3}{s}_{x}-{}_{3}{r}_{x}\cdot {}_{3}{s}_{z}}{{}_{3}{r}_{z}-{}_{3}{s}_{z}}=\frac{{C}_{S}.{}_{3}{r}_{z}-{C}_{R}.{}_{3}{s}_{z}}{{}_{3}{r}_{z}-{}_{3}{s}_{z}}$$

(31)

If _{3}*r*_{3}*s* runs parallel to *O*_{3}*q* in the *XY*-plane, thus with both _{3}*r*_{z}=0 and _{3}*s*_{z}=0, a choice is made for the position of the orthogonal connection line with

$$\begin{array}{c}{u}_{x}=\frac{\left(\mathrm{min}({}_{3}{r}_{x},{}_{3}{q}_{x})-\mathrm{max}(0,{}_{3}{s}_{x})\right)}{2}=\\ =\frac{\left(\mathrm{min}({C}_{R},PQ)-\mathrm{max}(0,{C}_{S})\right)}{2}\end{array}$$

(32)

when _{3}*r*_{x} >_{3}*s*_{x} (*C*_{R} >*C*_{S}), or

$$\begin{array}{c}{u}_{x}=\frac{\left(\mathrm{min}({}_{3}{s}_{x},{}_{3}{q}_{x})-\mathrm{max}(0,{}_{3}{r}_{x})\right)}{2}=\\ =\frac{\left(\mathrm{min}({C}_{S},PQ)-\mathrm{max}(0,{C}_{R})\right)}{2}\end{array}$$

(33)

when _{3}*s*_{x}<_{3}*r*_{x} (*C*_{s} >*C*_{R}). Evidently *t*_{x}=*u*_{x}

The final *condition*(*B2*) requires that the intersection point is within the length of *O*_{3}*q*, thus

$${}_{3}{p}_{x}\le {u}_{x}\le {}_{3}{q}_{x}\text{\hspace{0.17em}or\hspace{0.17em}}0\le {u}_{x}\le PQ$$

(34)

The fractions of the line pieces where the orthogonal connection intersects the line pieces is independent of the transformations applied and therefore we can derive the crossing point *T* on *PQ* to be at a fraction

$$f(T|PQ)=\frac{{t}_{x}}{{q}_{x}}=\frac{{t}_{x}}{PQ}$$

(35)

on the line piece *PQ* and the crossing point *U* on *RS* to be at a fraction of

$$f(U|RS)=\frac{{u}_{x}-{}_{3}{r}_{x}}{{}_{3}{s}_{x}-{}_{3}{r}_{x}}=\frac{{u}_{x}-C}{{C}_{S}-{C}_{R}}$$

(36)

of the line piece *RS*. The orthogonal distance between two crossing line pieces thus is between the point *T*(*x*, *y*, *z*) on *PQ*

$$\begin{array}{l}{T}_{x}={P}_{x}+f(T|PQ)\cdot ({Q}_{x}-{P}_{x})\\ {T}_{y}={P}_{y}+f(T|PQ)\cdot ({Q}_{y}-{P}_{y})\\ {T}_{z}={P}_{z}+f(T|PQ)\cdot ({Q}_{z}-{P}_{z})\end{array}$$

(37)

and the point *U*(*x*, *y*, *z*) on *RS*

$$\begin{array}{l}{U}_{x}={R}_{x}+f(U|RS)\cdot ({S}_{x}-{R}_{x})\\ {U}_{y}={R}_{y}+f(U|RS)\cdot ({S}_{y}-{R}_{y})\\ {U}_{z}={R}_{z}+f(U|RS)\cdot ({S}_{z}-{R}_{z})\end{array}$$

(38)

and is equal to

$$TU=\sqrt{{({T}_{x}-{U}_{x})}^{2}+{({T}_{y}-{U}_{y})}^{2}+{({T}_{z}-{U}_{z})}^{2}}$$

(39)

In the final step the orthogonal distance *TU* is tested against a given proximity criterion value.

The approach followed in this paper was first to test the crossing property of line pieces, followed by the calculation of the orthogonal distance. An alternative approach was introduced by Dan Sunday in his algorithm on the softsurfer.com website (http://softsurfer.com/Archive/algorithm_0106/algorithm_0106.htm). This algorithm first determines the crossing point of the infinite lines through the line pieces, followed by a test of whether or not the orthogonal connection line intersects the line pieces themselves and if so, followed by the distance calculation. The procedure of Sunday is described in “Analytical Approach” of Appendix and includes an algorithm for calculating the shortest distance between two non-crossing line pieces, i.e., when the line piece extensions appear to cross outside the range of the line pieces.

The “old” synapse formation model based on distance only and the “new” one based on crossing and distance have been applied to a network of 25 Layer 2/3 pyramidal neurons, with their cell bodies generated within a sphere of radius 43 μm with minimum neuron separation of 20μm. The neurons were generated using the NETMORPH simulator (Koene et al., 2009) based on growth parameter values optimized on a data set of reconstructed rat cerebral cortex L2/3 pyramidal neurons made available by Svoboda through the www.neuromorpho.org website (Ascoli et al., 2007). Examples are illustrated in Figure Figure88.

Outcomes of the “old” and “new” synapse formation model are illustrated in Figures Figures9A–D.9A–D. The figures show the axons (green), dendrites (red) and the synapse locations (small blue spheres). Figures Figures9A,B9A,B show the locations of candidate synapses when the crossing condition was not applied and only the shortest distance between line pieces was tested, using the algorithm based on Sunday's approach (Shortest Distance Between Two Non-Crossing Line Pieces). Figures Figures9C,D9C,D show the locations of candidate synapses when the crossing condition was applied and the orthogonal connection was subjected to the distance criterion. In all four panels the distance criterion was 4 μm. The results in Figures Figures9A,C9A,C were obtained with a time step parameter of 20000s, and those in Figures Figures9B,D9B,D with a time step parameter of 20s. The number of synapses formed is 32799 in Figure Figure9A,9A, 111104 in Figure Figure9B,9B, 1188 in Figure Figure9C,9C, and 1555 in Figure Figure9D,9D, respectively. Comparing these numbers as well as the pictures in the top and bottom row makes clear how the distance-based approach (top row) results in a strong clustering of synapses and how this is prevented by applying the crossing condition (bottom row). Comparing the synapse numbers as well as the pictures for “long” (left column) and “short” line pieces (right column) illustrates that the synapse formation model based on distance only is highly sensitive to the length scale (with synapse numbers 32799 versus 111104, respectively) while the synapse formation model based on crossing and distance grossly reduced this dependency (with synapse numbers 1188 versus 1555, respectively).

With the new synapse formation model, a first series of simulations have been performed on the number of synaptic contacts per connection between neuron pairs. To this end networks were generated with the NETMORPH simulator of 250 layer 2/3 pyramidal neurons arranged in a sphere with a radius of 93μm with realistic density of 75,000mm^{−3} (Hellwig, 2000). The minimum separation between somata was 20μm. Both the old synapse formation model based on distance only, as well as the new one based on crossing and distance, were used. For the old model a distance criterion of 2 μm was used (i.e., synapses were formed when an axon and a dendrite came within 2μm of each other, a distance criterion also used by Stepanyants and Chklovskii, 2005). The new synapse formation model has been applied with distance criteria of 2, 4, and 6 μm, respectively. The results of these simulations are shown in Figure Figure10,10, summarizing the distributions of the number of synaptic contacts per connection.

The left column of Figure Figure1010 shows the distribution of number of contacts/connection versus frequency for a synapse formation model based only on distance (see Shortest Distance Between Two Non-Crossing Line Pieces). The distributions illustrate the large number of contacts per connection as a result of the clustering effect when only a distance criterion is used. The distributions in the second, third, and fourth column are obtained with the new synapse formation model based on distance and crossing. The 2nd column was obtained with the same distance criterion of 2μm as the 1st column and comparing these columns shows how the additional crossing criterion reduces the number of contacts per connections to realistic values by eliminating the clustering effect. The third and fourth column are obtained for larger values of the distance criterion. As expected the number of contacts per connection increases with this criterion as the likelihood for sufficient proximity also increases, with mn(sd) values of 2.0(1.8), 3.4(3.9), and 5.1(6.5) contacts per connection for distance criteria of 2, 4, and 6 μm, respectively, and for using a time step of d*t*=20s (top row).

Experimental data for the number of synaptic contacts per connection show an average value of mn(sd) 2.8(0.7) (*n*=8 pairs) between L2/3 pyramidal neurons in the barrel cortex of juvenile rats (Feldmeyer et al., 2006), an average value of 4.5(0.5) (*n*=13 pairs) between juvenile rat barrel cortex L4 spiny neurons and L2/3 pyramidal cells (Feldmeyer et al., 2002), an average of 3.4(1.0) (*n*=11 pairs) between spiny rat somatosensory cortex L4 neurons (Feldmeyer et al., 1999), and an average number of 3.5 ±1.8 putative contacts per connection between juvenile rat somatosensory cortex L5A pyramidal cells (Frick et al., 2008). Hellwig (2000) estimated the number of synapses per connection from the overlap of voxelized images for nearby neurons to be about 2.5 for L2–L2 connections and about 1.2 for L3–L2 connections. The voxel size used of 1 ×1 ×1 μm^{3}, effectively implemented a distance criterion of 1μm. Although the experimental data originate from a variety of cell types and cortical areas, experimental numbers are in a rather restricted range of 2.5–4.5 contacts per connection. The values obtained with our new synapse formation model are in the range of 2.0–5.1 contacts per connection (for d*t*=20 s) when using distance criteria of 2, 4, and 6 μm. It is a remarkable result that the simulation outcomes overlap so nicely the range of experimental data. Stepanyants and Chklovskii (2005) estimated the number of potential synapses from a presynaptic neuron onto a postsynaptic neuron on the basis of reconstructed neurons (lower layer-4 spiny stellate neurons or layer 3 pyramidal neurons from cat visual cortex) as a function of the relative positions of their cell bodies and found numbers in the range of 0–6 potential synapses. Our findings are also in good agreement with these estimated numbers.

An additional outcome of our present simulations is that the frequency distributions are monotone decreasing with the number of contacts per connection, a property that is not yet experimentally observed due to the low numbers in the published distributions. The monotone decreasing distribution may not be surprising as the probability of having two contacts per connection is expected to be the square of the probability of having one contact per neuron pair.

Axons and dendrites can make synaptic connections at those locations where they come sufficiently close to each other, typically within a distance determined by the length of dendritic spines and axonal boutons. The present study aimed at defining a procedure for finding such locations in networks of neurons whose 3D geometry is represented by piecewise-linear structures (line pieces or cylinders) as is the case in experimental reconstructions and in computer generated morphologies from neural simulators. Proximity of axonal and dendritic branches is then tested by evaluating proximity of all pairs of line pieces that constitute both neuronal structures. Note that proximity is here taken between the axial center lines and that a criterion of proximity should consider both the branch diameters and the distance between the branch exteriors (such as spine and bouton lengths).

The disadvantage of a straightforward distance criterion is that it may be met by several combinations of nearby line pieces, resulting in clusters of candidate synaptic sites. Additionally, this number appeared to be sensitive to the length scale of the individual line pieces. The procedure introduced in this study aimed at representing the places where axonal and dendritic branches are sufficiently close by a single candidate synaptic site. To this end the line piece crossing criterion was introduced in addition to the distance criterion. This was based on the notion that the shortest distance between two infinite lines in 3D is determined by the length of the orthogonal connection line at the unique site of crossing of the infinite lines. Also two chains of line pieces will generally contain only one unique pair of mutual line pieces that fulfills the geometrical condition of crossing and identifies the unique location of shortest distance between the two chains of line pieces. For this reason, the crossing condition was introduced in addition to the distance criterion to eliminate the clustering artifact and to reduce the length scale dependency.

The paper describes the derivation of the crossing conditions by applying a series of 3D transformations to the line piece pair to bring them in such a 3D position that crossing can easily be determined. The conditions for crossing are finally summarized in a series of tests to be applied to all dendritic and axonal line piece pairs of two neuronal representations. The performance of the “new” synapse detection method has been illustrated visually in tests of the “old” and the “new” method, and quantitatively in terms of distributions of the number of contacts between connected neuron pairs. The obtained mean number of contacts per connection appeared to be in excellent agreement with the available experimental data. The frequency distributions for the number of contacts per connection had a monotone decreasing shape. Because of the small number of observations in experimental data this prediction is still waiting validation. The present outcomes clearly demonstrated that the new synapse detection model based on crossing and distance eliminated the clustering effect of the old model based on distance only, and reduced significantly the dependence on the length scale of the line pieces.

Although two chains of line pieces will generally contain only one unique pair of crossing line pieces, more than one crossing pair may occur under certain geometrical conditions. For instance, when a certain line piece *A1* of chain *A* is orthogonal and intersects the plane formed by two subsequent line pieces *B1* and *B2* of another chain *B*, then both *B1* and *B2* may cross the *A1* line piece. If so, and if the orthogonal connection in both pairs is meeting the distance criterion, then they result in two nearby candidate sites. Another case is when two line piece chains are running more or less in parallel. Then, crossing line piece pairs may occur at varying distances along both chains and, when they meet the distance criterion, result in as many candidate synaptic sites.

Axonal and dendritic branches may follow straight courses but may also meander strongly. Deviations from a straight line influence the way axons and dendrites are filling space. The probability of sites of near proximity is therefore expected to depend on the tortuosity of axonal and dendritic branches. It is an interesting question whether in real nervous tissue strongly meandering axons and dendrites make relative more synapses in comparison with straight ones. In our computer generated networks this is certainly expected when the meandering of the branches is approximated by line pieces with varying orientations. In a given area in space one may expect more nearby line piece pairs to cross and meeting the distance criterion at small length scales then at large length scales of the line pieces. It is thus not surprising that a remaining length scale dependency was also found with the new synapse formation model.

The algorithm for testing crossing line pieces derived in this paper differs from the one of Dan Sunday (Analytical Approach) by first testing whether or not two line pieces are crossing, and if so, followed by the distance calculation. The algorithm of Sunday, in contrast, first calculates the site where the infinite lines through the line pieces cross, followed by a test of whether or not this site of crossing coincides with the line pieces and if so, also followed by the distance calculation. This difference makes the present algorithm about 20% faster than Sunday's algorithm, when implemented in FORTRAN code on a Linux system.

The procedure described in this paper identifies the location where an axonal and a dendritic branch are sufficiently close by a single candidate synaptic site, and is purely based on geometrical considerations. Whether or not in the biological tissue at these sites synapses will actually form and in which number is a question not addressed in this paper. Dendrites may be covered by spines in high density suggesting that a nearby axon may form more than one synapse close in space. Such a clustering of synapses between a single axon and dendrite then has a biological origin and is thus principally different from the artifactual clustering caused by the search procedure that gave rise to this study. Nearby spines may of course also be contacted by axonal branches from different neurons. When they all meet the crossing and distance criteria, a clustering of candidate synaptic locations between a single dendritic branch and these different axons will then still occur.

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

This work was supported by EU BIO-ICT Project SECO (216593), and by NWO-CLS Project NETFORM (635.100.017).

Figure A1.1 illustrates the used symbols and the clockwise directions of the rotations around the axes. For the derivation of the rotation matrix with, for instance, rotation over angle alpha around the X-axis (see Figure A1.2) we obtain:

$$\begin{array}{l}{A}_{y}=AO\mathrm{cos}\delta \\ {A}_{z}=AO\mathrm{sin}\delta \end{array}$$

(A1-1)

$$\begin{array}{l}{A}_{\prime}^{x}={A}_{x}\\ {{A}^{\prime}}_{y}=AO\mathrm{cos}(\alpha +\delta )=AO\cdot \left[\mathrm{cos}\alpha \mathrm{cos}\delta -\mathrm{sin}\alpha .\mathrm{sin}\delta \right]\\ \text{\hspace{1em}\hspace{0.05em}\hspace{0.05em}\hspace{0.05em}}={A}_{y}\mathrm{cos}\alpha -{A}_{z}\mathrm{sin}\alpha \\ {{A}^{\prime}}_{z}=AO\mathrm{sin}(\alpha +\delta )=AO\cdot \left[\mathrm{sin}\alpha .\mathrm{cos}\delta +\mathrm{sin}\delta .\mathrm{cos}\alpha \right]\\ \text{\hspace{1em}\hspace{0.05em}\hspace{0.05em}}={A}_{y}\mathrm{sin}\alpha +{A}_{z}\mathrm{cos}\alpha \end{array}$$

(A1-2)

In matrix notation

$$\left(\begin{array}{c}{{A}^{\prime}}_{x}\\ {{A}^{\prime}}_{y}\\ {{A}^{\prime}}_{z}\end{array}\right)=\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\alpha & -\mathrm{sin}\alpha \\ 0& \mathrm{sin}\alpha & \mathrm{cos}\alpha \end{array}\right)\times \left(\begin{array}{c}{A}_{x}\\ {A}_{y}\\ {A}_{z}\end{array}\right)$$

(A1-3)

Thus the rotation matrix for a rotation around the *X*-axis becomes

$$Ro{t}_{X}(\alpha )=\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\alpha & -\mathrm{sin}\alpha \\ 0& \mathrm{sin}\alpha & \mathrm{cos}\alpha \end{array}\right)$$

(A1-4)

Similarly for rotations around the *Y*-axis and *Z*-axis we obtain

$$Ro{t}_{Y}(\beta )=\left(\begin{array}{ccc}\mathrm{cos}\beta & 0& -\mathrm{sin}\beta \\ 0& 1& 0\\ \mathrm{sin}\beta & 0& \mathrm{cos}\beta \end{array}\right)$$

(A1-5)

$$Ro{t}_{Z}(\gamma )=\left(\begin{array}{ccc}\mathrm{cos}\gamma & -\mathrm{sin}\gamma & 0\\ \mathrm{sin}\gamma & \mathrm{cos}\gamma & 0\\ 0& 0& 1\end{array}\right)$$

(A1-6)

We have

$$\begin{array}{cc}{c}_{1}=b\cdot \mathrm{cos}\alpha ,& {c}_{2}=a\cdot \mathrm{cos}\beta \end{array}$$

(A2-1)

and

$$\begin{array}{cc}\mathrm{cos}\alpha ={b}^{2}+{c}^{2}-{a}^{2}/2bc,& \mathrm{cos}\beta ={a}^{2}+{c}^{2}-{b}^{2}\end{array}/2ac$$

(A2-2)

thus

$$\begin{array}{cc}{c}_{1}={b}^{2}+{c}^{2}-{a}^{2}/2c,& {c}_{2}={a}^{2}+{c}^{2}-{b}^{2}\end{array}/2c$$

(A2-3)

For the relative position of *D* on *AB* we obtain

$$\begin{array}{l}f(D|AB)=\frac{{c}_{1}}{c}=\frac{{b}^{2}-{a}^{2}+{c}^{2}}{2{c}^{2}}\\ f(D|BA)=\frac{{c}_{2}}{c}=\frac{{a}^{2}-{b}^{2}+{c}^{2}}{2{c}^{2}}\end{array}$$

(A2-4)

The 3D coordinates of point *D* can now directly be obtained from the coordinates of *A* and *B* as

$$\begin{array}{l}{D}_{x}={A}_{x}+f(D|AB)\cdot ({B}_{x}-{A}_{x})\\ {D}_{y}={A}_{y}+f(D|AB)\cdot ({B}_{y}-{A}_{y})\\ {D}_{z}={A}_{z}+f(D|AB)\cdot ({B}_{z}-{A}_{z})\end{array}$$

(A2-5)

or

$$\begin{array}{l}{D}_{x}={B}_{x}+f(D|BA)\cdot ({A}_{x}-{B}_{x})\\ {D}_{y}={B}_{y}+f(D|BA)\cdot ({A}_{y}-{B}_{y})\\ {D}_{z}={B}_{z}+f(D|BA)\cdot ({A}_{z}-{B}_{z})\end{array}$$

(A2-6)

If points *A* and *B* coincide then point *D* adopts their coordinates and thus

$$\begin{array}{ccc}{D}_{x}={A}_{x}={B}_{x},& {D}_{y}={A}_{y}={B}_{y},& {D}_{z}={A}_{z}={B}_{z}\end{array}$$

(A2-7)

In the case of skewed triangles (lowest two triangles in Figure FigureA2),A2), the orthogonal lines *CD* on *AB* do not end any more on the line piece *AB* itself and the relative positions *f*(*D* |*AB*) and *f*(*D* |*BA*) can get values outside the range of [0, 1]. The relative position of the perpendicular ending in a triangle was used in Figure Figure6B6B to obtain the position of point *V* (see also Eq. 18). In a skewed triangle this point *V* would not be within the line piece _{2}*r*_{s}*s* in Figure Figure6B,6B, implicating that after rotation line piece _{3}*r*_{3}*s* does not intersect the *XY*-plane. Thus a skewed triangle already indicates that the line pieces are not crossing.

Some crossing conditions as described in the previous section still need to be expressed in terms of the coordinates of the original points *P*, *Q*, *R*, and *S*, or their relative coordinates, *p*, *q*, *r*, and *s* after their translations. In particular the quantities *f*_{v}, *V*_{y}, and *V*_{z} need further elaboration.

Equations 18 and 19 give us the expressions for *f*_{v}, *V*_{y}, and *V*_{z}, respectively

$$\begin{array}{l}{f}_{V}=\frac{1}{2}\cdot \frac{{l}_{{O}_{2}{r}^{\prime}}^{2}-{l}_{O{}_{2}{s}^{\prime}}^{2}}{{l}_{{{{}_{2}r}^{\prime}}_{2}{s}^{\prime}}^{2}}+\frac{1}{2},\text{\hspace{0.17em}}{V}_{y}{=}_{2}{r}_{y}+f{}_{V}\cdot ({}_{2}{s}_{y}{-}_{2}{r}_{y}),\text{\hspace{0.17em}and}\\ {V}_{z}{=}_{2}{r}_{z}+f{}_{V}\cdot ({}_{2}{s}_{z}-{r}_{z})\end{array}$$

Let us define

$$\begin{array}{l}c{}_{ry}=-{r}_{x}\cdot {q}_{y}+{r}_{y}\cdot {q}_{x}\\ c{}_{rz}=-{C}_{R}\cdot {q}_{z}+PQ\cdot {r}_{z}\\ c{}_{sy}=-{s}_{x}\cdot {q}_{y}+{s}_{y}\cdot {q}_{x}\\ c{}_{sz}=-{C}_{S}\cdot {q}_{z}+PQ\cdot {s}_{z}\end{array}$$

(A3-1)

then we obtain

$${}_{2}{r}_{y}=\frac{{c}_{ry}}{l}\begin{array}{cccc},& {}_{2}{r}_{z}=\frac{{c}_{rz}}{l},& {}_{2}{s}_{y}=\frac{{c}_{sy}}{l},& {}_{2}{s}_{z}=\frac{{c}_{sz}}{l}\end{array}$$

(A3-2)

and

$$\begin{array}{l}l{\text{\hspace{0.17em}}}_{{O}_{\text{\hspace{0.17em}}2}\text{\hspace{0.17em}}{r}^{\prime}}^{2}\text{\hspace{0.17em}}={\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{y}{\text{\hspace{0.17em}}}^{2}\text{\hspace{0.17em}}+\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{z}{\text{\hspace{0.17em}}}^{2}\text{\hspace{0.17em}}=\text{\hspace{0.17em}\hspace{0.17em}}\frac{c{\text{\hspace{0.17em}}}_{r\text{\hspace{0.17em}}y}{\text{\hspace{0.17em}}}^{2}\text{\hspace{0.17em}}+c{\text{\hspace{0.17em}}}_{r\text{\hspace{0.17em}}z}{\text{\hspace{0.17em}}}^{2}}{{l}^{\text{\hspace{0.17em}}2}}\\ l{\text{\hspace{0.17em}}}_{O{\text{\hspace{0.17em}}}_{2}{s}^{\prime}}^{2}\text{\hspace{0.17em}}={\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}{s}_{y}^{2}\text{\hspace{0.17em}}+\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}{s}_{z}^{2}=\frac{c{\text{\hspace{0.17em}}}_{s\text{\hspace{0.17em}}y}{\text{\hspace{0.17em}}}^{2}\text{\hspace{0.17em}}+c{\text{\hspace{0.17em}}}_{s\text{\hspace{0.17em}}z}{\text{\hspace{0.17em}}}^{2}}{l{\text{\hspace{0.17em}}}^{2}}\\ l{\text{\hspace{0.17em}}}_{\text{\hspace{0.17em}}{{r}^{\prime}}_{\text{\hspace{0.17em}}2}\text{\hspace{0.17em}}{s}^{\prime}}^{2}\text{\hspace{0.17em}\hspace{0.17em}}=\text{\hspace{0.17em}\hspace{0.17em}}(\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{y}\text{\hspace{0.17em}}-{\text{\hspace{0.17em}}}_{2}\text{\hspace{0.17em}}s{\text{\hspace{0.17em}}}_{y}){\text{\hspace{0.17em}}}^{2}\text{\hspace{0.17em}}+(\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}r{\text{\hspace{0.17em}}}_{z}\text{\hspace{0.17em}}-\text{\hspace{0.17em}}{}_{2}\text{\hspace{0.17em}}s{\text{\hspace{0.17em}}}_{z}){\text{\hspace{0.17em}}}^{2}\text{\hspace{0.17em}}=\text{\hspace{0.17em}\hspace{0.17em}\hspace{0.17em}}\frac{\left(\text{\hspace{0.17em}\hspace{0.17em}}c{\text{\hspace{0.17em}}}_{r\text{\hspace{0.17em}}y}\text{\hspace{0.17em}}-c{\text{\hspace{0.17em}}}_{s\text{\hspace{0.17em}}y}\right){\text{\hspace{0.17em}}}^{2}\text{\hspace{0.17em}}+\text{\hspace{0.17em}\hspace{0.17em}}\left(\text{\hspace{0.17em}}c{\text{\hspace{0.17em}}}_{r\text{\hspace{0.17em}}z}\text{\hspace{0.17em}}-\text{\hspace{0.17em}\hspace{0.17em}}c{\text{\hspace{0.17em}}}_{s\text{\hspace{0.17em}}z}\right){\text{\hspace{0.17em}}}^{2}}{l{\text{\hspace{0.17em}}}^{2}}\end{array}$$

(A3-3)

such that we obtain for *f*_{v}, *V*_{y}, and *V*_{z}

$$\begin{array}{l}{f}_{V}=\frac{1}{2}\cdot \frac{{l}_{{O}_{2}{r}^{\prime}}^{2}-{l}_{{O}_{2}{s}^{\prime}}^{2}}{{l}_{{{r}^{\prime}}_{2}{s}^{\prime}}^{2}}+\frac{1}{2}=\frac{1}{2}\cdot \frac{{c}_{ry}^{2}+{c}_{rz}^{2}-{c}_{sy}^{2}-{c}_{sz}^{2}}{{\left({c}_{ry}-{c}_{sy}\right)}^{2}+{\left({c}_{rz}-{c}_{sz}\right)}^{2}}+\frac{1}{2}\\ {V}_{y}{=}_{2}{r}_{y}+f{}_{V}\cdot ({}_{2}{s}_{y}{-}_{2}{r}_{y})=\frac{1}{l}\cdot \left({c}_{ry}+f{}_{V}\cdot \left({c}_{sy}-{c}_{ry}\right)\right)\\ {V}_{z}{=}_{2}{r}_{z}+f{}_{V}\cdot ({}_{2}{s}_{z}{-}_{2}{r}_{z})=\frac{1}{l}\cdot \left({c}_{rz}+{f}_{V}\cdot \left({c}_{sz}-{c}_{rz}\right)\right)\end{array}$$

(A3-4)

and for the ratio *V*_{y}/*V*_{z}

$$\frac{{V}_{y}}{{V}_{z}}=\frac{{c}_{ry}+{f}_{V}\cdot \left({c}_{sy}-{c}_{ry}\right)}{{c}_{rz}+{f}_{V}\cdot \left({c}_{sz}-{c}_{rz}\right)}$$

(A3-5)

Next, the quantities _{3}*r*_{x}, _{3}*s*_{x}, _{3}*r*_{z}, and _{3}*s*_{z} can be expressed in terms of the coordinates of the original points *P*, *Q*, *R*, and *S*, with the subsequent calculation of *u*_{x}. Equations 23 and 24 give us the expressions for these quantities as

$${}_{3}{s}_{x}={C}_{S},{\text{\hspace{0.17em}}}_{3}{r}_{x}={C}_{R},\text{and}$$

$${}_{3}{r}_{z}=\frac{-{V}_{z}\cdot \left[-{r}_{x}\cdot {q}_{y}+{r}_{y}\cdot {q}_{x}\right]+{V}_{y}\cdot \left[-{C}_{R}\cdot {q}_{z}+PQ\cdot {r}_{z}\right]}{l\cdot {l}_{OV}}$$

$${}_{3}{s}_{z}=\frac{-{V}_{z}\cdot \left[-{s}_{x}\cdot {q}_{y}+{s}_{y}\cdot {q}_{x}\right]+{V}_{y}\cdot \left[-{C}_{S}\cdot {q}_{z}+PQ\cdot {s}_{z}\right]}{l\cdot {l}_{OV}}$$

For the numerator in the expression for *u*_{x} (Eq. 31) we obtain

$$\begin{array}{l}{C}_{S}{\cdot}_{3}{r}_{z}-{C}_{R}{\cdot}_{3}{s}_{z}=\\ =\frac{-{V}_{z}\cdot \left[-{C}_{S}\cdot {r}_{x}\cdot {q}_{y}+{C}_{S}\cdot {r}_{y}\cdot {q}_{x}\right]+{V}_{y}\cdot \left[-{C}_{S}\cdot {C}_{R}\cdot {q}_{z}+{C}_{S}\cdot PQ\cdot {r}_{z}\right]}{l\cdot {l}_{OV}}+\\ -\frac{-{V}_{z}\cdot \left[-{C}_{R}\cdot {s}_{x}\cdot {q}_{y}+{C}_{R}\cdot {s}_{y}\cdot {q}_{x}\right]+{V}_{y}\cdot \left[-{C}_{R}\cdot {C}_{S}\cdot {q}_{z}+{C}_{R}\cdot {s}_{z}\cdot PQ\right]}{l\cdot {l}_{OV}}\\ =\frac{-{V}_{z}\cdot \left[{q}_{y}\left[-{C}_{S}\cdot {r}_{x}+{C}_{R}\cdot {s}_{x}\right]+{q}_{x}\cdot \left[{C}_{S}\cdot {r}_{y}-{C}_{R}\cdot {s}_{y}\right]\right]}{l\cdot {l}_{OV}}\\ +\frac{{V}_{y}\cdot PQ\cdot \left[{C}_{S}\cdot {r}_{z}-{C}_{R}\cdot {s}_{z}\right]}{l\cdot {l}_{OV}}\end{array}$$

and for the denominator in the expression for *u*_{x} (Eq. 31)

$$\begin{array}{l}{}_{3}{r}_{z}-{}_{3}{s}_{z}\\ =\frac{-{V}_{z}\cdot \left[-{r}_{x}\cdot {q}_{y}+{r}_{y}\cdot {q}_{x}\right]+{V}_{y}\cdot \left[-{C}_{R}\cdot {q}_{z}+PQ\cdot {r}_{z}\right]}{l\cdot {l}_{OV}}-\\ +\frac{-{V}_{z}\cdot \left[-{s}_{x}\cdot {q}_{y}+{s}_{y}\cdot {q}_{x}\right]+{V}_{y}\cdot \left[-{C}_{S}\cdot {q}_{z}+PQ\cdot {s}_{z}\right]}{l\cdot {l}_{OV}}\\ =\frac{-{V}_{z}\cdot \left[-{r}_{x}\cdot {q}_{y}+{r}_{y}\cdot {q}_{x}+{s}_{x}\cdot {q}_{y}-{s}_{y}\cdot {q}_{x}\right]}{l\cdot {l}_{OV}}\\ +\frac{{V}_{y}\cdot \left[-{C}_{R}\cdot {q}_{z}+PQ\cdot {r}_{z}+{C}_{S}\cdot {q}_{z}-PQ\cdot {s}_{z}\right]}{l\cdot {l}_{OV}}\\ =\frac{-{V}_{z}\cdot \left[{q}_{x}\cdot ({r}_{y}-{s}_{y})-{q}_{y}\cdot ({r}_{x}-{s}_{x})\right]}{l\cdot {l}_{OV}}\\ +\frac{{V}_{y}\cdot \left[{q}_{z}\cdot ({C}_{S}-{C}_{R})+PQ\cdot ({r}_{z}-{s}_{z})\right]}{l\cdot {l}_{OV}}\end{array}$$

Now we obtain for the expression of *u*_{x} (Eq. 31)

$${u}_{x}=\frac{{C}_{S}\cdot {}_{3}{r}_{z}-{C}_{R}\cdot {}_{3}{s}_{z}}{{}_{3}{r}_{z}-{}_{3}{s}_{z}}=\frac{A}{B}$$

with

$$\begin{array}{l}A={q}_{y}\cdot (-{C}_{S}\cdot {r}_{x}+{C}_{R}\cdot {s}_{x})+{q}_{x}\cdot ({C}_{S}\cdot {r}_{y}-{C}_{R}\cdot {s}_{y})+\\ -\frac{{V}_{y}}{{V}_{z}}\cdot PQ\cdot ({C}_{S}\cdot {r}_{z}-{C}_{R}\cdot {s}_{z})\\ B={q}_{x}\cdot ({r}_{y}-{s}_{y})-{q}_{y}\cdot ({r}_{x}-{s}_{x})+\\ -\frac{{V}_{y}}{{V}_{z}}\cdot \left[{q}_{z}\cdot ({C}_{S}-{C}_{R})+PQ\cdot ({r}_{z}-{s}_{z})\right]\end{array}$$

(A3-6)

$${C}_{R}=\frac{{r}_{x}\cdot {q}_{x}+{r}_{y}\cdot {q}_{y}+{r}_{z}\cdot {q}_{z}}{PQ},\text{\hspace{1em}}{C}_{S}=\frac{{s}_{x}\cdot {q}_{x}+{s}_{y}\cdot {q}_{y}+{s}_{z}\cdot {q}_{z}}{PQ},$$

and via Eq. 4

$$PQ=\sqrt{{q}_{x}^{2}+{q}_{y}^{2}+{q}_{z}^{2}}$$

Given: the coordinates of the points *P*(*x*, *y*, *z*), *Q*(*x*, *y*, *z*), *R*(*x*, *y*, *z*) and *S*(*x*, *y*, *z*)

- Translation of
*P*to origin:$$\begin{array}{l}\begin{array}{ccc}{q}_{x}={Q}_{x}-{P}_{x}& {q}_{y}={Q}_{y}-{P}_{y}& {q}_{z}={Q}_{z}-{P}_{z}\end{array}\\ \begin{array}{ccc}{r}_{x}={R}_{x}-{P}_{x}& {r}_{y}={R}_{y}-{P}_{y}& {r}_{z}={R}_{z}-{P}_{z}\end{array}\\ \begin{array}{ccc}{s}_{x}={S}_{x}-{P}_{x}& {s}_{y}={S}_{y}-{P}_{y}& {s}_{z}={S}_{z}-{P}_{z}\end{array}\end{array}$$(A4-1) - Constants:$$\begin{array}{l}q\cdot q={q}_{x}\cdot {q}_{x}+{q}_{y}\cdot {q}_{y}+{q}_{z}\cdot {q}_{z}\\ r\cdot q={r}_{x}\cdot {q}_{x}+{r}_{y}\cdot {q}_{y}+{r}_{z}\cdot {q}_{z}\\ s\cdot q={s}_{x}\cdot {q}_{x}+{s}_{y}\cdot {q}_{y}+{s}_{z}\cdot {q}_{z}\end{array}$$(A4-2)
- Test on crossing condition
*B1*that after the rotations the line pieces should have at least overlapping*x*-coordinates:$$\begin{array}{ccc}PQ=\sqrt{q\cdot q},& {C}_{R}=\frac{r\cdot q}{PQ},& {C}_{S}=\frac{s\cdot q}{PQ}\end{array}$$$$\text{If\hspace{0.17em}}C{}_{R}>C{}_{S}\text{\hspace{0.17em}}\text{then\hspace{0.17em}}(C{}_{R}>0\text{\hspace{0.17em}and\hspace{0.17em}}C{}_{s}<PQ)$$(A4-3)orIf $C{}_{S}>C$ then ($C{}_{S}>0$ and $C{}_{R}<PQ$)If condition*B1*is not fulfilled then no crossing and stop.Note: because the length*PQ*is a positive number one may also compare the quantities$$\begin{array}{cc}{C}_{\prime}^{R}=\frac{{C}_{R}}{PQ}=\frac{r\cdot q}{q\cdot q},& {C}_{\prime}^{S}=\frac{{C}_{S}}{PQ}=\frac{s\cdot q}{q\cdot q}\end{array}$$making condition*B1*equivalent to:$$\text{If\hspace{0.17em}}{C}_{R}^{\prime}>{{C}^{\prime}}_{S}\text{\hspace{0.17em}then\hspace{0.17em}}({{C}^{\prime}}_{R}>0\text{\hspace{0.17em}and\hspace{0.17em}}{{C}^{\prime}}_{S}<1)$$(A4-4)orIf ${C}_{S}^{\prime}>{C}_{R}^{\prime}$ then (${C}_{S}^{\prime}>0$ and ${C}_{R}^{\prime}<1$)As this*B1*test does not require a square root floating point operation (for*PQ*) it generates faster computer code, which is relevant if most comparisons in actual circumstances do not meet condition*B1*. If condition*B1*is not fulfilled then no crossing and stop, else calculate*PQ*. If condition*B1*is fulfilled then proceed. - More constants:$$\begin{array}{l}l=\sqrt{P{Q}^{2}-{q}_{z}}\\ c{}_{ry}=-{r}_{x}\cdot {q}_{y}+{r}_{y}\cdot {q}_{x}\\ c{}_{rz}=-{C}_{R}\cdot {q}_{z}+PQ\cdot {r}_{z}\\ c{}_{sy}=-{s}_{x}\cdot {q}_{y}+{s}_{y}\cdot {q}_{x}\\ c{}_{sz}=-{C}_{S}\cdot {q}_{z}+PQ\cdot {s}_{z}\end{array}$$(A4-5)
- Calculate coordinates
_{3}*r*_{z}and_{3}*s*_{z}First test if*PQ*and*RS*are parallel line pieces- 5a. If running parallel, i.e., when both
_{2}*r*_{y}=_{2}*s*_{y}and_{2}*r*_{z}=_{2}*s*_{z}, then coordinates_{3}*r*_{z}and_{3}*s*_{z}are equal to zero$$\begin{array}{cc}{}_{3}{r}_{z}=0,& {}_{3}{s}_{z}=0\end{array}$$(A4-6) - 5b. If
*PQ*and*RS*in one plane, i.e., when $\frac{{}_{2}{r}_{y}^{\prime}}{{}_{2}{r}_{z}^{\prime}}=\frac{{}_{2}{s}_{y}^{\prime}}{{}_{2}{s}_{z}^{\prime}},$ or $\frac{{}_{2}{r}_{y}}{{}_{2}{r}_{z}}=\frac{{}_{2}{s}_{y}}{{s}_{z}},$ thus if $\frac{{c}_{ry}}{{c}_{rz}}=\frac{{c}_{sy}}{{c}_{sz}}$ or ${c}_{ry}\cdot {c}_{sz}={c}_{rz}\cdot {c}_{sy}$(see Expressing the Crossing Conditions in Terms of the Original Coordinates) but not running parallel, then coordinates_{3}*r*_{z}and_{3}*s*_{z}are given by$$\begin{array}{cc}{}_{3}{r}_{z}={l}_{O{}_{2}{r}^{\prime}},& {}_{3}{s}_{z}=-{l}_{O{}_{2}{s}_{x}\text{'}}\end{array}$$(A4-7)with (see Expressing the Crossing Conditions in Terms of the Original Coordinates)$$\begin{array}{cc}{l}_{{O}_{2}{r}^{\prime}}^{2}=\frac{{c}_{ry}^{2}+{c}_{rz}^{2}}{{l}^{2}},& {l}_{{O}_{2}{s}^{\prime}}^{2}=\frac{{c}_{sy}^{2}+{c}_{sz}^{2}}{{l}^{2}}\end{array}$$(A4-8) - 5c. If
*PQ*and*RS*not in one plane then coordinates_{3}*r*_{z}and_{3}*s*_{z}are obtained as follows - 5c1. Ratio
*f*_{v}$${f}_{V}=\frac{1}{2}\cdot \frac{{c}_{ry}^{2}+{c}_{rz}^{2}-{c}_{sy}^{2}-{c}_{sz}^{2}}{{\left({c}_{ry}-{c}_{sy}\right)}^{2}+{\left({c}_{rz}-{c}_{sz}\right)}^{2}}+\frac{1}{2}$$(A4-9) - 5c2. Coordinates and length of
*V*$$\begin{array}{l}{V}_{y}=\frac{1}{l}\cdot \left({c}_{ry}+f{}_{V}\cdot \left({c}_{sy}-{c}_{ry}\right)\right)\\ {V}_{z}=\frac{1}{l}\cdot \left({c}_{rz}+{f}_{V}\cdot \left({c}_{sz}-{c}_{rz}\right)\right)\\ {l}_{OV}=\sqrt{{V}_{y}^{2}+{V}_{z}^{2}}\end{array}$$(A4-10) - 5c3. Coordinates
_{3}*r*_{z}and_{3}*s*_{z}:$$\begin{array}{cc}{}_{3}{r}_{z}=\frac{-{V}_{z}\cdot {c}_{ry}+{V}_{y}\cdot {c}_{rz}}{l\cdot {l}_{OV}},& {}_{3}{s}_{z}=\frac{-{V}_{z}\cdot {c}_{sy}+{V}_{y}\cdot {c}_{sz}}{l\cdot {l}_{OV}}\end{array}$$(A4-11)

- Test on crossing condition
*A*that after the rotations line piece_{3}*r*_{3}*s*intersects the*XY*-plane:$${}_{3}{r}_{x}\cdot {}_{3}{s}_{x}\le 0$$(A4-12)If condition*A*is fulfilled (and condition*B1*was already fulfilled – see step 3) then proceed with calculation of*x*-coordinate of the intersection point. - Coordinate
*u*_{x}:- 7a. If both line pieces are running parallel, thus both
_{3}*r*_{z}=0 and_{3}*s*_{z}=0, a choice is made for the position*u*_{x}as$$\begin{array}{l}{u}_{x}=\frac{\left(\mathrm{min}({C}_{R},PQ)-\mathrm{max}(0,{C}_{R})\right)}{2},\text{\hspace{0.17em}when\hspace{0.17em}}{C}_{R}>{C}_{S}\text{\hspace{0.17em}or}\\ {u}_{x}=\frac{\left(\mathrm{min}({C}_{S},PQ)-\mathrm{max}(0,{C}_{R})\right)}{2},\text{\hspace{0.17em}when\hspace{0.17em}}{C}_{S}>{C}_{R}\end{array}$$(A4-13) - 7b. If both line pieces are not running parallel then$${u}_{x}=\frac{{C}_{S}\cdot {}_{3}{r}_{z}-{C}_{R}\cdot {}_{3}{s}_{z}}{{}_{3}{r}_{z}-{}_{3}{s}_{z}}$$(A4-14)

- Test on condition
*B2*that the intersection point is within the length of*PQ*$$0\le {u}_{x}\le PQ$$(A4-15)If finally condition*B2*is also fulfilled, then the line pieces are crossing and therefore proceed - Ratios
*f*_{T}and*f*_{U}:$${f}_{T}=\frac{{u}_{x}}{PQ},\text{\hspace{0.17em}and\hspace{0.17em}}{f}_{U}=\frac{{u}_{x}-C}{C{}_{S}-{C}_{R}}$$(A4-16) - Coordinates of the endpoints
*T*and*U*of the orthogonal distance*TU*between crossing line pieces*PQ*and*RS*, respectively:

$$\begin{array}{l}{T}_{x}={P}_{x}+{f}_{T}\cdot ({Q}_{x}-{P}_{x})\\ {T}_{y}={P}_{y}+{f}_{T}\cdot ({Q}_{y}-{P}_{y})\\ {T}_{z}={P}_{z}+{f}_{T}\cdot ({Q}_{z}-{P}_{z})\end{array}$$

$$\begin{array}{l}{U}_{x}={R}_{x}+{f}_{U}\cdot ({S}_{x}-{R}_{x})\\ {U}_{y}={R}_{y}+{f}_{U}\cdot ({S}_{y}-{R}_{y})\\ {U}_{z}={R}_{z}+{f}_{U}\cdot ({S}_{z}-{R}_{z})\end{array}$$

(A4-17)

$$TU=\sqrt{{({T}_{x}-{U}_{x})}^{2}+{({T}_{y}-{U}_{y})}^{2}+{({T}_{z}-{U}_{z})}^{2}}$$

An alternative approach uses an algorithm taken from the site http://softsurfer.com/Archive/algorithm_0106/algorithm_0106.htm by Dan Sunday.

In this analytical geometry approach the shortest distance between the two infinite lines through the line pieces *PQ* and *RS* is first been determined, followed by the test whether the orthogonal connection line intersects the line pieces *PQ* and *RS*, respectively.

The infinite line *A* through the points *P* and *Q* can be described as

$$A(s)=P+s\cdot \stackrel{\rightharpoonup}{u}\text{\hspace{0.17em}with\hspace{0.17em}vector\hspace{0.17em}}\stackrel{\rightharpoonup}{u}=(Q-P)=\left(\begin{array}{c}{Q}_{x}-{P}_{x}\\ {Q}_{y}-{P}_{y}\\ {Q}_{z}-{P}_{z}\end{array}\right)$$

(A5-1)

and the infinite line *B* through the points R and S as

$$B(t)=R+t\cdot \stackrel{\rightharpoonup}{v}\text{\hspace{0.17em}with\hspace{0.17em}vector\hspace{0.17em}}\stackrel{\rightharpoonup}{v}=(S-R)=\left(\begin{array}{c}{S}_{x}-{R}_{x}\\ {S}_{y}-{R}_{y}\\ {S}_{z}-{R}_{z}\end{array}\right)$$

(A5-2)

Note that for *s*[0, 1], the point *A*(*s*) is positioned on the line piece *PQ*, and that for *t*[0, 1], the point *B*(*t*) is positioned on the line piece *RS*. Let vector $\stackrel{\rightharpoonup}{w}(s,t)$ connects a point *A*(*s*) on line *A* with a point *B*(*t*) on line *B* as

$$\stackrel{\rightharpoonup}{w}(s,t)=A(s)-B(t)=P-R+s\stackrel{\rightharpoonup}{u}-t\stackrel{\rightharpoonup}{v}={\stackrel{\rightharpoonup}{w}}_{0}+s\stackrel{\rightharpoonup}{u}-t\stackrel{\rightharpoonup}{v}$$

(A5-3)

with

$${\stackrel{\rightharpoonup}{w}}_{0}=P-R$$

(A5-4)

Lines *A* and *B* cross each other where the distance between points on both lines is the shortest, say at *A*(*s*_{c}) and *B*(*t*_{c}). The vector ${\stackrel{\rightharpoonup}{w}}_{c}$ between these points then is orthogonal to line *A* and line *B*, and we obtain

$$\stackrel{\rightharpoonup}{u}\cdot {\stackrel{\rightharpoonup}{w}}_{c}=0,\text{\hspace{0.17em}and\hspace{0.17em}}\stackrel{\rightharpoonup}{v}\cdot {\stackrel{\rightharpoonup}{w}}_{c}=0$$

(A5-5)

such that

$$\stackrel{\rightharpoonup}{u}\cdot {\stackrel{\rightharpoonup}{w}}_{0}+{s}_{c}(\stackrel{\rightharpoonup}{u}\cdot \stackrel{\rightharpoonup}{u})-{t}_{c}(\stackrel{\rightharpoonup}{u}\cdot \stackrel{\rightharpoonup}{v})=0$$

(A5-6)

and

$$\stackrel{\rightharpoonup}{v}\cdot {\stackrel{\rightharpoonup}{w}}_{0}+{s}_{c}(\stackrel{\rightharpoonup}{v}\cdot \stackrel{\rightharpoonup}{u})-{t}_{c}(\stackrel{\rightharpoonup}{v}\cdot \stackrel{\rightharpoonup}{v})=0$$

(A5-7)

Let us define:

$$\begin{array}{l}a=\stackrel{\rightharpoonup}{u}\cdot \stackrel{\rightharpoonup}{u}=(Q{\text{\hspace{0.17em}}}_{x}\text{\hspace{0.17em}}-P{\text{\hspace{0.17em}}}_{x}){\text{\hspace{0.17em}}}^{2}\text{\hspace{0.17em}}+\text{\hspace{0.17em}\hspace{0.17em}}(\text{\hspace{0.17em}}Q{\text{\hspace{0.17em}}}_{y}\text{\hspace{0.17em}}-P{\text{\hspace{0.17em}}}_{y}){\text{\hspace{0.17em}}}^{2}\text{\hspace{0.17em}}+(\text{\hspace{0.17em}}Q{\text{\hspace{0.17em}}}_{z}\text{\hspace{0.17em}}-P{\text{\hspace{0.17em}}}_{z}){\text{\hspace{0.17em}}}^{2}\\ b=\stackrel{\rightharpoonup}{u}\cdot \stackrel{\rightharpoonup}{v}=({Q}_{\text{\hspace{0.17em}}x}-{P}_{\text{\hspace{0.17em}}x})\cdot (S{\text{\hspace{0.17em}}}_{x}-R{\text{\hspace{0.17em}}}_{x})\\ \text{\hspace{1em}\hspace{0.17em}}+(Q{\text{\hspace{0.17em}}}_{y}\text{\hspace{0.17em}}-P{\text{\hspace{0.17em}}}_{y})\cdot (S{\text{\hspace{0.17em}}}_{y}\text{\hspace{0.17em}}-R{\text{\hspace{0.17em}}}_{y})\text{\hspace{0.17em}\hspace{0.17em}}+\text{\hspace{0.17em}\hspace{0.17em}}(Q{\text{\hspace{0.17em}}}_{z}\text{\hspace{0.17em}}-P{\text{\hspace{0.17em}}}_{z})\cdot (\text{\hspace{0.17em}}S{\text{\hspace{0.17em}}}_{z}\text{\hspace{0.17em}}-\text{\hspace{0.17em}\hspace{0.17em}}R{\text{\hspace{0.17em}}}_{z})\\ c=\stackrel{\rightharpoonup}{v}\cdot \stackrel{\rightharpoonup}{v}=(\text{\hspace{0.17em}}S{\text{\hspace{0.17em}}}_{x}\text{\hspace{0.17em}}-R{\text{\hspace{0.17em}}}_{x}){\text{\hspace{0.17em}}}^{2}\text{\hspace{0.17em}}+\text{\hspace{0.17em}\hspace{0.17em}}(\text{\hspace{0.17em}}S{\text{\hspace{0.17em}}}_{y}\text{\hspace{0.17em}}-R{\text{\hspace{0.17em}}}_{y}\text{\hspace{0.17em}}){\text{\hspace{0.17em}}}^{2}+(\text{\hspace{0.17em}}S{\text{\hspace{0.17em}}}_{z}\text{\hspace{0.17em}}-R{\text{\hspace{0.17em}}}_{z}){\text{\hspace{0.17em}}}^{2}\\ d=\overrightarrow{u}\cdot {\stackrel{\rightharpoonup}{w}}_{0}=(\text{\hspace{0.17em}}Q{\text{\hspace{0.17em}}}_{x}\text{\hspace{0.17em}}-P{\text{\hspace{0.17em}}}_{x}\text{\hspace{0.17em}})\cdot (\text{\hspace{0.17em}}P{\text{\hspace{0.17em}}}_{x}\text{\hspace{0.17em}}-R{\text{\hspace{0.17em}}}_{x})\\ \text{\hspace{1em}\hspace{0.17em}}+(Q{\text{\hspace{0.17em}}}_{y}\text{\hspace{0.17em}}-P{\text{\hspace{0.17em}}}_{y})\cdot (\text{\hspace{0.17em}}P{\text{\hspace{0.17em}}}_{y}\text{\hspace{0.17em}}-R{\text{\hspace{0.17em}}}_{y})\text{\hspace{0.17em}\hspace{0.17em}}+\text{\hspace{0.17em}\hspace{0.17em}}(\text{\hspace{0.17em}}Q{\text{\hspace{0.17em}}}_{z}\text{\hspace{0.17em}}-P{\text{\hspace{0.17em}}}_{z})\cdot (\text{\hspace{0.17em}}P{\text{\hspace{0.17em}}}_{z}\text{\hspace{0.17em}}-R{\text{\hspace{0.17em}}}_{z})\\ e=\stackrel{\rightharpoonup}{v}\cdot \stackrel{\rightharpoonup}{w}{\text{\hspace{0.17em}}}_{0}\text{\hspace{0.17em}}=(\text{\hspace{0.17em}}S{\text{\hspace{0.17em}}}_{x}\text{\hspace{0.17em}}-R{\text{\hspace{0.17em}}}_{x}\text{\hspace{0.17em}})\cdot (\text{\hspace{0.17em}}P{\text{\hspace{0.17em}}}_{x}\text{\hspace{0.17em}}-R{\text{\hspace{0.17em}}}_{x})\\ \text{\hspace{1em}\hspace{0.17em}}+(\text{\hspace{0.17em}}{S}_{\text{\hspace{0.17em}}y}\text{\hspace{0.17em}\hspace{0.17em}}-\text{\hspace{0.17em}\hspace{0.17em}}{R}_{\text{\hspace{0.17em}}y}\text{\hspace{0.17em}})\cdot (\text{\hspace{0.17em}}P{\text{\hspace{0.17em}}}_{y}\text{\hspace{0.17em}}-R{\text{\hspace{0.17em}}}_{y})\text{\hspace{0.17em}\hspace{0.17em}}+\text{\hspace{0.17em}\hspace{0.17em}}(\text{\hspace{0.17em}}S{\text{\hspace{0.17em}}}_{z}\text{\hspace{0.17em}}-R{\text{\hspace{0.17em}}}_{z})\cdot (\text{\hspace{0.17em}}P{\text{\hspace{0.17em}}}_{z}\text{\hspace{0.17em}}-R{\text{\hspace{0.17em}}}_{z})\end{array}$$

(A5-8)

then we obtain

$$d+a{s}_{c}-b{t}_{c}=0\text{\hspace{0.17em}and\hspace{0.17em}}e+b{s}_{c}-c{t}_{c}=0$$

(A5-9)

and their solutions as

$${s}_{c}=\frac{be-cd}{ac-{b}^{2}}\text{\hspace{0.17em}and\hspace{0.17em}}{t}_{c}=\frac{ae-bd}{ac-{b}^{2}}$$

(A5-10)

With the solutions for *s*_{c} and *t*_{c}, the points *A*(*s*_{c}) and *B*(*t*_{c}) are defined and their distance can be calculated as

$$\begin{array}{l}dist=\left|A({s}_{c})-B({t}_{c})\right|=\left|{\stackrel{\rightharpoonup}{w}}_{0}+{s}_{c}\cdot \stackrel{\rightharpoonup}{u}-{t}_{c}\cdot \stackrel{\rightharpoonup}{v}\right|=\\ =\sqrt{\begin{array}{l}{\left({w}_{0x}+{s}_{c}\cdot {u}_{x}-{t}_{c}\cdot {v}_{x}\right)}^{2}\\ +{\left({w}_{0y}+{s}_{c}\cdot {u}_{y}-{t}_{c}\cdot {v}_{y}\right)}^{2}\\ +{\left({w}_{0z}+{s}_{c}\cdot {u}_{z}-{t}_{c}\cdot {v}_{z}\right)}^{2}\end{array}}\\ =\sqrt{\begin{array}{l}{\left({P}_{x}-{R}_{x}+{s}_{c}\cdot ({Q}_{x}-{P}_{x})-{t}_{c}\cdot ({S}_{x}-{R}_{x})\right)}^{2}\\ +{\left({P}_{y}-{R}_{y}+{s}_{c}\cdot ({Q}_{y}-{P}_{y})-{t}_{c}\cdot ({S}_{y}-{R}_{y})\right)}^{2}\\ +{\left({P}_{z}-{R}_{z}+{s}_{c}\cdot ({Q}_{z}-{P}_{z})-{t}_{c}\cdot ({S}_{z}-{R}_{z})\right)}^{2}\end{array}}\end{array}$$

(A5-11)

The requirement that the lines pieces *PQ* and *RS* themselves need to cross (Figure A5.1B) rather than their extensions (Figure A5.1A) can be tested by the values of the parameters *s*_{c} and *t*_{c}. When they are both in the domain [0, 1], thus when

$${s}_{c}\in [0,1]\text{\hspace{0.17em}and\hspace{0.17em}}{t}_{c}\in [0,1]$$

(A5-12)

then the points *A*(*s*_{c}) and *B*(*t*_{c}) are on the line pieces *PQ* and *RS*, respectively.

Two particular cases need further attention.

When the two line pieces (and their infinite extensions) are running parallel the two equations in (Eq. A5-9) are dependent with the denominator (Eq. A5-10) being zero. The distance between the parallel lines can be determined by taking for instance an arbitrary value for *s*_{c}, say *s*_{c}=0, and then solving (Eq. A5-9) resulting in *t*_{c}=*d*/*b*=*e*/*c*, followed by the calculation of the distance using (Eq. A5-11). By running parallel, an infinite number of orthogonal connections can be drawn between both lines. Additional tests are now needed to determine whether both line pieces share a range where they intersect both these orthogonal connection lines. If not, then both line pieces are not crossing. If yes, then a choice need to be made for a particular orthogonal connection line and the intersection points at both line pieces (in order to locate a synaptic connection); see the choice made in Eqs. 32 and 33.

When the two line pieces are not parallel but still in one plane then they intersect and a solution exists for the equality *A*(*s*) =*B*(*t*). Then, using Eqs. A5-1 and A5-2 we obtain
$P+s\cdot \stackrel{\rightharpoonup}{u}=R+t\cdot \stackrel{\rightharpoonup}{v}$ or $P-R+s\cdot (Q-P)-t\cdot (S-R)=0$

This set of equations (for *x*, *y*, and *z*-coordinates) has a solution for *s* and *t* when

$$\left|\begin{array}{ccc}{P}_{x}-{R}_{x}& {Q}_{x}-{P}_{x}& {S}_{x}-{R}_{x}\\ {P}_{y}-{R}_{y}& {Q}_{y}-{P}_{y}& {S}_{y}-{R}_{y}\\ {P}_{z}-{R}_{z}& {Q}_{z}-{P}_{z}& {S}_{z}-{R}_{z}\end{array}\right|=0$$

resulting in

$$s=\frac{{b}_{x}{c}_{y}-{b}_{y}{c}_{x}}{{a}_{x}{b}_{y}-{a}_{y}{b}_{x}}\text{\hspace{0.17em}and\hspace{0.17em}}t=\frac{{a}_{x}{c}_{y}-{a}_{y}{c}_{x}}{{a}_{y}{b}_{x}-{a}_{x}{b}_{y}}$$

For the corresponding points $A(s)=P+s\cdot \stackrel{\rightharpoonup}{u}$ and $B(t)=R+t\cdot \stackrel{\rightharpoonup}{v}$, it has subsequently to be determined if they are located on the line segments *PQ* and *RS*, respectively.

The procedure for calculating the shortest distance between two line pieces *PQ* and *RS* is based on an algorithm of Dan Sunday (http://softsurfer.com/Archive/algorithm_0106/algorithm_0106.htm) and is taken as the shortest distance between any two points on these line pieces, respectively.

A line piece *P*Q is given by the points on the line *A* (Figure A5.2):

$$A(s)=P+s(Q-P)=P+s\stackrel{\rightharpoonup}{u}\text{\hspace{0.17em}with\hspace{0.17em}}0\le s\le 1.$$

A line piece *RS* is given by the points on the line *B* (Figure A5.2):

$$B(t)=R+t(S-R)=R+t\stackrel{\rightharpoonup}{v}\text{\hspace{0.17em}with\hspace{0.17em}}0\le t\le 1.$$

If the points *A*(*s*_{c}) and *B*(*t*_{c}) at the crossing of infinite lines *A* and *B* are located on the line segments *PQ* and *RS* respectively, then they define the orthogonal connection and the line pieces *PQ* and *RS* themselves do cross. If *A*(*s*_{c}) and *B*(*t*_{c}) are located outside of the ranges of either one or both of the two line pieces, then we need to find the values of *s* and *t* which define the shortest connection $\stackrel{\rightharpoonup}{w}(s,t)=A(s)-B(t)={\stackrel{\rightharpoonup}{w}}_{0}+s\stackrel{\rightharpoonup}{u}-t\stackrel{\rightharpoonup}{v}$ between the line pieces. Minimizing the length of $\stackrel{\rightharpoonup}{w}(s,t)$ is equivalent to minimizing |*w*(*s*, *t*)|^{2}, thus minimizing $\left({\stackrel{\rightharpoonup}{w}}_{0}+s\stackrel{\rightharpoonup}{u}-t\stackrel{\rightharpoonup}{v}\right)\cdot \left({\stackrel{\rightharpoonup}{w}}_{0}+s\stackrel{\rightharpoonup}{u}-t\stackrel{\rightharpoonup}{v}\right)$. For the infinite lines this function has its true, global minimum at their crossing site (*s _{c}*,

$$\left|{w}^{2}(1,t)\right|=({\stackrel{\rightharpoonup}{w}}_{0}+s\stackrel{\rightharpoonup}{u}-\stackrel{\rightharpoonup}{v})\cdot ({\stackrel{\rightharpoonup}{w}}_{0}+s\stackrel{\rightharpoonup}{u}-\stackrel{\rightharpoonup}{v}).$$

Taking the derivative with respect to *s* we obtain

$$0=\frac{d{\left|w\right|}^{2}}{ds}=-2\stackrel{\rightharpoonup}{u}\cdot ({\stackrel{\rightharpoonup}{w}}_{0}+s\stackrel{\rightharpoonup}{u}-\stackrel{\rightharpoonup}{v})\text{suchthat}$$

$${s}_{0}=\frac{\stackrel{\rightharpoonup}{u}\cdot \stackrel{\rightharpoonup}{v}-\stackrel{\rightharpoonup}{u}\cdot {\stackrel{\rightharpoonup}{w}}_{0}}{\stackrel{\rightharpoonup}{u}\cdot \stackrel{\rightharpoonup}{u}}$$

Therefore the shortest distance occurs between the points *S* and *A*(*s*_{0}). A similar procedure applies for other configurations, with for instance *B*(*t*_{c}) on line piece *RS* and a search for the closest point on *PQ*.

- Amirikian B. (2005). A phenomenological theory of spatially structured local synaptic connectivity. PLoS Comput. Biol. 1, 74–8510.1371/journal.pcbi.0010011 [PMC free article] [PubMed] [Cross Ref]
- Ascoli G. A., Donohue D. E., Halavi M. (2007). NeuroMorpho.Org: a central resource for neuronal morphologies. J. Neurosci. 27(35), 9247–925110.1523/JNEUROSCI.2055-07.2007 [PubMed] [Cross Ref]
- Ascoli G., Krichmar J. (2000). L-neuron: a modeling tool for the efficient generation and parsimonious description of dendritic morphology. Neurocomputing 32–33, 1003–101110.1016/S0925-2312(00)00272-1 [Cross Ref]
- Costa L. F., Coelho R. C. (2005). Growth driven percolations: the dynamics of connectivity in neuronal systems.Eur. Phys. J. B 47, 571–58110.1140/epjb/e2005-00354-5 [Cross Ref]
- Costa L. F., Coelho R. C. (2008). Growth-driven percolations: the dynamics of community formation in neuronal systems. arXiv:q-bio/0411009v1 [q-bio.NC].
- Costa L. F., Manoel E. T. (2002). A percolation approach to neural morphometry and connectivity, Neuroinformatics 1, 65–8010.1385/NI:1:1:065 [PubMed] [Cross Ref]
- Cuntz H., Forstner F., Borst A., Häusser M. (2010). One rule to grow them all: a general theory of neuronal branching and its practical application. PLoS Comput. Biol. 6, e1000877.10.1371/journal.pcbi.1000877 [PMC free article] [PubMed] [Cross Ref]
- Eberhard J. P., Wanner A., Wittum G. (2006). NeuGen: a tool for the generation of realistic morphology of cortical neurons and neuronal networks in 3D. Neurocomputing 70, 327–34210.1016/j.neucom.2006.01.028 [Cross Ref]
- Feldmeyer D., Egger V., Lübke J., Sakmann B. (1999). Reliable synaptic connections between pairs of excitatory layer 4 neurones within a single “barrel” of developing rat somatosensory cortex. J. Physiol. 521, 169–19010.1111/j.1469-7793.1999.00169.x [PubMed] [Cross Ref]
- Feldmeyer D., Lübke J., Sakmann B. (2006). Efficacy and connectivity of intracolumnar pairs of layer 2/3 pyramidal cells in the barrel cortex of juvenile rats. J. Physiol. 575, 583–60210.1113/jphysiol.2006.105106 [PubMed] [Cross Ref]
- Feldmeyer D., Lübke J., Silver R. A., Sakmann B. (2002). Synaptic connections between layer 4 spiny neurone- layer 2/3 pyramidal cell pairs in juvenile rat barrel cortex: physiology and anatomy of interlaminar signalling within a cortical column. J. Physiol. 538, 803–82210.1113/jphysiol.2001.012959 [PubMed] [Cross Ref]
- Frick A., Feldmeyer D., Helmstaedter M., Sakmann B. (2008). Monosynaptic connections between pairs of L5A pyramidal neurons in columns of juvenile rat somatosensory cortex. Cereb. Cortex 18, 397–40610.1093/cercor/bhm074 [PubMed] [Cross Ref]
- Gleeson P., Steuber V., Silver R. (2007). Neuroconstruct: a tool for modeling networks of neurons in 3D space. Neuron 54, 219–23510.1016/j.neuron.2007.03.025 [PMC free article] [PubMed] [Cross Ref]
- Hellwig B. (2000). A quantitative analysis of the local connectivity between pyramidal neurons in layer 2/3 of the rart visual cortex. Biol. Cybern. 82, 111–12110.1007/PL00007964 [PubMed] [Cross Ref]
- Hilgetag C. C., Kaiser M. (2004). Clustered organization of cortical connectivity (review article). Neuroinformatics 2, 353–36010.1385/NI:2:3:353 [PubMed] [Cross Ref]
- Kaiser M., Hilgetag C. C., Kötter R. (2010). Hierarchy and dynamics of neural networks. Front. Neuroinform. 4112.10.3389/fninf.2010.00112 [PMC free article] [PubMed] [Cross Ref]
- Kalisman N., Silberberg G., Markram H. (2003). Deriving physical connectivity from neuronal morphology. Biol. Cybern. 88, 210–21810.1007/s00422-002-0377-3 [PubMed] [Cross Ref]
- Koene R. A., Tijms B., van Hees P., Postma F., de Ridder A., Ramakers G., van Pelt J., van Ooyen A. (2009). NETMORPH: a framework for the stochastic generation of large scale neuronal networks with realistic neuron morphologies. Neuroinformatics 7, 195–21010.1007/s12021-009-9052-3 [PubMed] [Cross Ref]
- Le Bé J. V., Silberberg G., Wang Y., Markram H. (2007). Morphological, electrophysiological, and synaptic properties of corticocallosal pyramidal cells in the neonatal rat neocortex. Cereb. Cortex 17, 2204–221310.1093/cercor/bhl127 [PubMed] [Cross Ref]
- Luczak A. (2006). Spatial embedding of neuronal trees modeled by diffusive growth. J. Neurosci. Methods 157, 132–14110.1016/j.jneumeth.2006.03.024 [PubMed] [Cross Ref]
- Passingham R. E., Stephan K. E., Kötter R. (2002). The anatomical basis of functional localization in the cortex. Nat. Rev. Neurosci. 3, 606–616 [PubMed]
- Peters A. (1979). Thalamic input to the cerebral cortex. Trends Neurosci. 2, 1183–118510.1016/0166-2236(79)90074-2 [Cross Ref]
- Samsonovich A., Ascoli G. (2007). “Computational models of dendritic morphology: from parsimonious description to biological insight,” in Modeling Biology, Structures, Behaviors, Evolution, eds Laubichler M., Müller G., editors. (Cambridge, Massachusetts: MIT; ), 91–113
- Senft S., Ascoli G. (1999). Reconstruction of brain networks by algorithmic amplification of morphometry data. Lect. Notes Comput. Sci. 1606, 25–3310.1007/BFb0098157 [Cross Ref]
- Sporns O., Tononi G., Kötter R. (2005). The human connectome: a structural description of the human brain. PLoS Comput. Biol. 1, e42.10.1371/journal.pcbi.0010042 [PMC free article] [PubMed] [Cross Ref]
- Stam C. J., Reijneveld J. C. (2007). Graph theoretical analysis of complex networks in the brain. Nonlinear Biomed. Phys. 1, 3.10.1186/1753-4631-1-3 [PMC free article] [PubMed] [Cross Ref]
- Stepanyants A., Chklovskii D. B. (2005). Neurogeometry and potential synaptic connectivity. Trends Neurosci. 28, 387–39410.1016/j.tins.2005.05.006 [PubMed] [Cross Ref]
- Stepanyants A., Hof P. R., Chklovskii D. B. (2002). Geometry and structural plasticity of synaptic connectivity. Neuron 34, 275–28810.1016/S0896-6273(02)00652-9 [PubMed] [Cross Ref]
- Watts D. J., Strogatz S. H. (1998). Collective dynamics of “small-world” networks. Nature 393, 440–44210.1038/30918 [PubMed] [Cross Ref]
- Zubler F., Douglas R. (2009). A framework for modeling the growth and development of neurons and networks. Front in Computational Neuroscience,10.3389/neuro.10.025.2009 [PMC free article] [PubMed] [Cross Ref]

Articles from Frontiers in Computational Neuroscience are provided here courtesy of **Frontiers Media SA**

PubMed Central Canada is a service of the Canadian Institutes of Health Research (CIHR) working in partnership with the National Research Council's national science library in cooperation with the National Center for Biotechnology Information at the U.S. National Library of Medicine(NCBI/NLM). It includes content provided to the PubMed Central International archive by participating publishers. |