PMCCPMCCPMCC

Search tips
Search criteria 

Advanced

 
Logo of frontcompneuroLink to Publisher's site
 
Front Comput Neurosci. 2010; 4: 148.
Published online 2010 November 29. doi:  10.3389/fncom.2010.00148
PMCID: PMC3001749

An Algorithm for Finding Candidate Synaptic Sites in Computer Generated Networks of Neurons with Realistic Morphologies

Abstract

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.

Keywords: neuronal morphology, synaptic connectivity, line crossing, spatial proximity

Introduction

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.

Figure 1
(A) Two straight lines A and B and their projections on a plane V orthogonally connected at their shortest distance at the site of crossing, (B) Two chains of line pieces A and D and their projections on a plane V. Green lines connect those line pieces ...

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.

Materials and Methods

Proximity-based search of candidate synaptic locations

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).

Crossing line pieces

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.

Figure 2
(A) Example of two line pieces A and D that do not cross. Although the projection dV of D onto the plane V intersects with A, the projection dW of D onto the plane W through A and parallel to D does not. (B) Two line pieces A and D that do cross, because ...

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.

Algorithm for determining whether two line pieces are crossing

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.

Transformation I – translation of P, Q, R, and S according to P(X, Y, Z) → O(0, 0, 0)

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

Figure 3
Translation of the line pieces PQ and RS toward line pieces pq and rs, respectively such that point p coincides with the origin O.
px=0py=0,pz=0qx=QxPxqy=QyPy,qz=QzPzrx=RxPxry=RyPy,rz=RzPzsx=SxPxsy=SyPysz=SzPz
(1)

Transformation II – first rotation of q, r, and s around Z-axis toward 1q, 1r, and 1s, respectively, such that 1q is in the XZ-plane

The rotation around the Z-axis, see Figure Figure4,4, proceeds via 1q = RotZ (γ) • q or

Figure 4
Rotation of line pieces pq and rs around Z-axis into p1q and 1r1s, respectively, and such that 1q rotates into ZX-plane.
(1qx1qy1qz)=(cosγsinγ0sinγcosγ0001)×(qxqyqz)
(2)

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

cosγ=cosδ=cosδ=qxlsinγ=sinδ=sinδ=qyl
(3)

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

l=qx2+qy2=PQ2qz2
(4)

with PQ=qx2+qy2+qz2 denoting the length of line piece PQ

For the rotation equations we obtain

1qx=qx.cosγqy.sinγ=qx2+qy2l=l1qy=qx.sinγ+qy.cosγ=qxqy+qy.qxl=01qz=qz
(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 O1q and Oq are equal to the length of the original line piece PQ (O1q = Oq = PQ). The rotations of r and s toward 1r and 1s proceed via

1r=RotZ(γ)r and1s=RotZ(γ)s, 
(6)

respectively, and we obtain

1rx=rxcosγrysinγ=rxqx+ryqyl1ry=rxsinγ+rycosγ=rxqy+ryqxl1rz=rz
(7)

and

1sx=sxcosγsysinγ=sxqx+syqyl1sy=sxsinγ+sycosγ=sxqy+syqxl1sz=sz
(8)

Transformation III – second rotation of 1q, 1r, and 1s around Y-axis into 2q, 2r, and 2s, respectively, such that 2q is on the X-axis, thus making the line piece O2q to coincide with the X-axis

The rotation around the Y-axis, see Figure Figure5,5, proceeds via 2q = RotY (β). 1q or

Figure 5
Rotation of line pieces p1q and 1r1s around Y-axis into p2q and 2r2s, respectively, with 2q on the X-axis.
(2qx2qy2qz)=(cosβ0sinβ010sinβ0cosβ)×(1qx1qy1qz)
(9)

If ε equals the angle of O1q with the x-axis then the rotation angle β is equal to -ε, thus

cosβ=cosε=cosε=1qxO1q=lPQsinβ=sinε=sinε=1qzO1q=qzPQ
(10)

Thus:

2qx=1qx.cosβ1qzsinβ=1qx2+q1z2PQ=PQ2qy=1qy=02qz=1qxsinβ+1qzcosβ=0
(11)

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

The rotations of 1r and 1s toward 2r and 2s proceed similarly via

2r=RotY(β)1r and 2s=RotY(β)1s,
(12)

respectively, and we obtain

2rx=1rxcosβ1rzsinβ=1rxl+1rz  qzPQ==rx  qx+  ryqy+rzqzPQ=rqPQ=CR
(13)

using the expressions for 1rx and 1rz. Because the expression for 2rx will occur frequently in following expressions we will assign it a special symbol CR = 2rx.

2ry=1ry=rxqy+ry  qxl
(14)
2rz=1rxsinβ+1rzcosβ=1rxqzPQ+1rz  lPQ==rxqx+ryqylqzPQ+rz  lPQ==rxqx+ryqylqzPQ+rzPQ2rzqz2lPQ==rxqx+ryqy+rzqzPQqzl+rzPQl=CRqz+PQrzl
(15)

using the expressions for 1rx and 1rz, followed by further elaboration. In a similar way we obtain for 2s

2sx=sxqx+syqy+szqzPQ=CS2sy=1sy=sxqy+syqxl2sz=CSqz+PQszl
(16)

Because also the expression for 2sx will occur frequently in following expressions we have assigned it the special symbol CS = 2sx

Transformation IV – third rotation of 2q, 2r, and 2s around X-axis into 3q, 3r, and 3s such that the rotated line piece 3r3s runs parallel to the ZX-plane, thus with 3r and 3s having equal Y-coordinates

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).

Figure 6
(A) Shows the rotation of line pieces p2q and 2r2s around X-axis into p3q and 3r3s, respectively, such that 3r3s, runs parallel to ZX-plane. (B) Illustrates the rotation of the projections of the line pieces onto the YZ-plane. (C) Illustrates the rotation ...

The rotation around the X-axis proceeds via 3r = RotX (α). 2r and 3s = RotX (α). 2s or

(3rx3ry3rz)=(1000cosαsinα0sinαcosα)×(2rx2ry2rz)and(3sx3sy3sz)=(1000cosαsinα0sinαcosα)×(2sx2sy2sz)
(17)

Thus:

rx=2rx=  CRsx=2sx=CSry=2ry  cosα    2rzsinαandsy=2sycosα2szsinαrz=2rysinα+2rzcosαsz=2sysinα+2szcosα

The rotation angle α can be obtained by the following geometrical considerations. Let 2r2s′ and 3r3s′ be the projections of 2rss and 3r3s onto the YZ-plane. Evidently, 2ry=2ry, 2rz=2rz, 2sy=2sy, and sz=  2sz.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 2r2s′. Let this perpendicular end in point V (Figure (Figure6B).6B). The coordinates of point V can be obtained by calculating its relative position on 2r2s′ (f(V|2r2s′)) or in short notation (fv). 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

fV=f(V|r2s2)=lrVlrs2=lO2r2lOs22+lr2s22lr2s2=12lO2r2lOs22lr2s2+12

with

lO2r2=2ry2+2rz2lO2s2=2sy2+s2z2lr2s2=(2ry2sy)2+(2rz2sz)2
(18)

the squared length of the projections of the respective line pieces in the YZ-plane. With the fraction fv the y- and z-coordinates of point V can be calculated as

Vy=2ry+fV(2sy2ry)=2ry+fV(2sy2ry)Vz=2rz  +fV(2sz2rz)=2rz  +fV(2sz2rz)
(19)

When both line pieces PQ and RS are in one plane and are running parallel, then line piece 2r2s runs parallel to the X-axis, the projection points 2r′ and 2s′ coincide and the length lr2s is zero. Then the coordinates Vy and Vz coincide with those of 2r′ and 2s

Vy=2ry=sy2,Vz=2rz=sz2
(20)

With the length of the line piece OV(lOV=Vy2+Vz2), the orientation angle δ of line piece OV is obtained as

sinδ=VzVy2+Vz2=VzlOV, and cosδ=VyVy2+Vz2=VylOV
(21)

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

sinα=sinδ=sinδ=VzlOVcosα=cosδ=cosδ=VylOV
(22)

The rotations in Eq. 17 3r = RotX (α). 2r and 3s = RotX (α). 2s can now be made explicit as

3rx=2rx=CR3ry=2rycosαrz2sinα==1lOV(ry2Vy+ry2Vz)==Vy[rxqy+ryqx]Vz[CRqz+PQrz]llOVrz3=2rysinα+rz2cosα=1lOV(ry2Vz+rz2V.)=Vz[rxqy+ryqx]+Vy[CRqz+PQrz]llOV
(23)

and similarly

sx3=2sx=CSsy3=2sycosαsz2sinα=1lOV(sy2Vy+sz2Vz)=Vy[sxqy+syqx]Vz[CSqz+PQsz]llOVsz3=2sysinα+sz2cosα=1lOV(sy2Vz+sz2Vy)=Vz[sxqy+syqx]+Vy[CSqz+PQsz]llOV
(24)

By the rotation the points 3r and 3s have obtained equal y-coordinates.

Line pieces PQ and RS in one plane

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 2r2s′ has an orientation through the origin (i.e., the line piece 2r2s′ 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

2rz2ry  =  2sz2sy

The orientation of the perpendicular to line piece 2r2s′ is then given by

sin(90+δ)=cosδ=2rylOr2=2sylOs2cos(90+δ)=sinδ=2rzlOr2=2szlOs2
(25)

such that

sinα=sinδ=sinδ=2r​​​ ylOr2=2sylOs2cosα=cosδ=cosδ=2r  zlOr2=2s  zlOs2
(26)

Thus for non-parallel line pieces in one plane, the rotations in Eq. 17 3r = RotX(α). 2r and 3s = RotX (α). 2s become

rx3=2rx=CRry3=2rycosαrz2sinα=ry2rz2rz2ry2lOry2=0rz3=ry2sinα+rz2cosα=ry2ry2+rz2rz2lOr2=ry22+rz22lOr2=lOr22lOr2=lOr2
(27)

and similarly

sx3=2sx=CSsy3=2sycosαsz2sinα=sy2sz2sz2sy2lOs2=0sz3=2sysinα+sz2cosα=sy2sy2+sz2sz2lOs2=sy22sz22lOs2=lOs22lOs2=lOs2
(28)

Applying the conditions for crossing line pieces

After the series of transformations the line pieces O3q and 3r3s are in the geometrical positions of O3q coinciding with the X-axis, and 3r3s running parallel to the ZX-plane (Figure (Figure77).

Figure 7
Determination of whether line pieces O3q and 3r3s are crossing. Then, line piece 3r3s (running parallel to ZX-plane) should intersect the XY-plane and the intersection point should have an x-coordinate overlapping line piece O3q.

Now it can easily be determined whether they are crossing. With 3r3s running parallel to the ZX-plane, its projection 3r3s′ onto the XY-plane runs parallel to the X-axis. If (A) 3r3s intersects the XY-plane, and (B) if this intersection point u of 3r3s with the XY-plane has an x-coordinate within the length of 3p3q (3px  ux  3qx) then O3q and 3r3s 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 3r3s crosses the XY-plane if the product of the z-coordinates of 3r and 3s is negative or if one or both of them equals zero, thus if

rz3sz30
(29)

If both coordinates are zero, line piece 3r3s runs parallel to O3q and is in the XY-plane. If one of the coordinates is zero, line piece 3r3s has one point in the XY-plane.

Condition B requires first (B1) an overlap of x-coordinates of O3q and 3r3s, thus when

rx3>0 and sx3<qx3, when rx3>sx3orsx3>0 and rx3<qx3, when sx3>rx3
(30)

As O3q originates from the transformed line piece PQ its length equals that of PQ, thus 3qx = PQ. Using the symbols CR and CS, Eq. 30 can also be phrased as

CR>0 and CR<PQ, when CR>CSorCS>0 and CR<PQ, when CS>CR
(30a)

If both conditions (A) and (B1) are fulfilled the perpendicular distance from intersection point u of 3r3s with the XY-plane to the point t on the line piece O3q can be determined as

uxsx3uxrx3=sz3rz3

with

ux=rz3sx3rx3sz3rz3sz3=CS.rz3CR.sz3rz3sz3
(31)

If 3r3s runs parallel to O3q in the XY-plane, thus with both 3rz = 0 and 3sz = 0, a choice is made for the position of the orthogonal connection line with

ux=(min(rx3,qx3)max(0,sx3))2==(min(CR,PQ)max(0,CS))2
(32)

when 3rx > 3sx (CR > CS), or

ux=(min(sx3,qx3)max(0,rx3))2==(min(CS,PQ)max(0,CR))2
(33)

when 3sx < 3rx (Cs > CR). Evidently tx = ux

The final condition(B2) requires that the intersection point is within the length of O3q, thus

px3uxqx3 or 0uxPQ
(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)=txqx=txPQ
(35)

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

f(U|RS)=uxrx3sx3rx3=uxCCSCR
(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

Tx=Px+f(T|PQ)(QxPx)Ty=Py+f(T|PQ)(QyPy)Tz=Pz+f(T|PQ)(QzPz)
(37)

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

Ux=Rx+f(U|RS)(SxRx)Uy=Ry+f(U|RS)(SyRy)Uz=Rz+f(U|RS)(SzRz)
(38)

and is equal to

TU=(TxUx)2+(TyUy)2+(TzUz)2
(39)

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

Alternative Approach for Testing Crossing of Line Pieces

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.

Results

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.

Figure 8
Visualization of experimental reconstructed and computer generated neurons. Axons are in green and dendrites are in red. (A) Four L2/3 rat cortical pyramidal neurons by Svoboda from the www.neuromorpho.org database. (B) Six neurons generated by NETMORPH ...

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 20000 s, and those in Figures Figures9B,D9B,D with a time step parameter of 20 s. 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).

Figure 9
Illustrations of spatial distributions of synaptic contacts in NETMORPH generated networks. The figures show the cell bodies (white spheres), axons (green), dendrites (red), and the synaptic contacts (small blue spheres). A distance criterion of 4 μm ...

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,000 mm−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.

Figure 10
Distributions of the number of contacts per connection. Synaptic connectivity in a simulated NETMORPH network of 250 layer 2/3 pyramidal neurons with their cell bodies arranged in a sphere with realistic density of 75,000 mm−3 (Hellwig, ...

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 dt = 20 s (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 μm3, 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 dt = 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.

Discussion

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.

Conflict of Interest Statement

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.

Acknowledgments

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

Appendix

Rotations in 3D

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:

Ay=AOcosδAz=AOsinδ
(A1-1)
Ax=AxAy=AOcos(α+δ)=AO[cosαcosδsinα.sinδ]    =AycosαAzsinαAz=AOsin(α+δ)=AO[sinα.cosδ+sinδ.cosα]   =Aysinα+Azcosα
(A1-2)

Figure A1.1

An external file that holds a picture, illustration, etc.
Object name is fncom-04-00148-a001.jpg

Directions of rotations around the three axes in an orthogonal coordinate system.

Figure A1.2

An external file that holds a picture, illustration, etc.
Object name is fncom-04-00148-a002.jpg

Rotation of line piece AO around X-axis into AO.

In matrix notation

(AxAyAz)=(1000cosαsinα0sinαcosα)×(AxAyAz)
(A1-3)

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

RotX(α)=(1000cosαsinα0sinαcosα)
(A1-4)

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

RotY(β)=(cosβ0sinβ010sinβ0cosβ)
(A1-5)
RotZ(γ)=(cosγsinγ0sinγcosγ0001)
(A1-6)

Relative position of point D of the perpendicular from point C to opposite side AB in a triangle ABC

We have

c1=bcosα,c2=acosβ
(A2-1)

and

cosα=b2+c2a2/2bc,cosβ=a2+c2b2/2ac
(A2-2)

thus

c1=b2+c2a2/2c,c2=a2+c2b2/2c
(A2-3)

For the relative position of D on AB we obtain

f(D|AB)=c1c=b2a2+c22c2f(D|BA)=c2c=a2b2+c22c2
(A2-4)

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

Dx=Ax+f(D|AB)(BxAx)Dy=Ay+f(D|AB)(ByAy)Dz=Az+f(D|AB)(BzAz)
(A2-5)

or

Dx=Bx+f(D|BA)(AxBx)Dy=By+f(D|BA)(AyBy)Dz=Bz+f(D|BA)(AzBz)
(A2-6)

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

Dx=Ax=Bx,Dy=Ay=By,Dz=Az=Bz
(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 2rss in Figure Figure6B,6B, implicating that after rotation line piece 3r3s does not intersect the XY-plane. Thus a skewed triangle already indicates that the line pieces are not crossing.

Figure A2

An external file that holds a picture, illustration, etc.
Object name is fncom-04-00148-a003.jpg

Triangles and perpendiculars from point C to opposite side AB.

Expressing the crossing conditions in terms of the original coordinates

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 fv, Vy, and Vz need further elaboration.

Equations 18 and 19 give us the expressions for fv, Vy, and Vz, respectively

fV=12lO2r2lOs22lr22s2+12,Vy=2ry+fV(sy22ry), andVz=2rz+fV(sz2rz)

Let us define

c=ryrxqy+ryqxc=rzCRqz+PQrzc=sysxqy+syqxc=szCSqz+PQsz
(A3-1)

then we obtain

ry2=cryl,rz2=crzl,sy2=csyl,sz2=cszl
(A3-2)

and

lO2r2=2ry2+2rz2=  cry2+crz2l2lO2s2=2sy2+2sz2=csy2+csz2l2lr2s2  =  (2ry2sy)2+(2rz2sz)2=   (  crycsy)2+  (crz  csz)2l2
(A3-3)

such that we obtain for fv, Vy, and Vz

fV=12lO2r2lO2s2lr2s2+12=12cry2+crz2csy2csz2(crycsy)2+(crzcsz)2+12Vy=2ry+fV(sy22ry)=1l(cry+fV(csycry))Vz=2rz+fV(sz22rz)=1l(crz+fV(cszcrz))
(A3-4)

and for the ratio Vy/Vz

VyVz=cry+fV(csycry)crz+fV(cszcrz)
(A3-5)

Next, the quantities 3rx, 3sx, 3rz, and 3sz can be expressed in terms of the coordinates of the original points P, Q, R, and S, with the subsequent calculation of ux. Equations 23 and 24 give us the expressions for these quantities as

sx3=CS,3rx=CR, and
rz3=Vz[rxqy+ryqx]+Vy[CRqz+PQrz]llOV
sz3=Vz[sxqy+syqx]+Vy[CSqz+PQsz]llOV

For the numerator in the expression for ux (Eq. 31) we obtain

CS3rzCR3sz==Vz[CSrxqy+CSryqx]+Vy[CSCRqz+CSPQrz]llOV+Vz[CRsxqy+CRsyqx]+Vy[CRCSqz+CRszPQ]llOV=Vz[qy[CSrx+CRsx]+qx[CSryCRsy]]llOV+VyPQ[CSrzCRsz]llOV

and for the denominator in the expression for ux (Eq. 31)

rz3sz3=Vz[rxqy+ryqx]+Vy[CRqz+PQrz]llOV+Vz[sxqy+syqx]+Vy[CSqz+PQsz]llOV=Vz[rxqy+ryqx+sxqysyqx]llOV+Vy[CRqz+PQrz+CSqzPQsz]llOV=Vz[qx(rysy)qy(rxsx)]llOV+Vy[qz(CSCR)+PQ(rzsz)]llOV

Now we obtain for the expression of ux (Eq. 31)

ux=CSrz3CRsz3rz3sz3=AB

with

A=qy(CSrx+CRsx)+qx(CSryCRsy)+VyVzPQ(CSrzCRsz)B=qx(rysy)qy(rxsx)+VyVz[qz(CSCR)+PQ(rzsz)]
(A3-6)

with (Eqs. 13 and 16)

CR=rxqx+ryqy+rzqzPQ,CS=sxqx+syqy+szqzPQ,

and via Eq. 4

PQ=qx2+qy2+qz2

Summary of calculations and crossing conditions

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

  1. Translation of P to origin:
    qx=QxPxqy=QyPyqz=QzPzrx=RxPxry=RyPyrz=RzPzsx=SxPxsy=SyPysz=SzPz
    (A4-1)
  2. Constants:
    qq=qxqx+qyqy+qzqzrq=rxqx+ryqy+rzqzsq=sxqx+syqy+szqz
    (A4-2)
  3. Test on crossing condition B1 that after the rotations the line pieces should have at least overlapping x-coordinates:
    PQ=qq,CR=rqPQ,CS=sqPQ
    If C>RCSthen (C>R0 and C<sPQ)
    (A4-3)
    or
    If C>SC then (C>S0 and C<RPQ)
    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
    CR=CRPQ=rqqq,CS=CSPQ=sqqq
    making condition B1 equivalent to:
    If CR>CS then (CR>0 and CS<1)
    (A4-4)
    or
    If CS>CR then (CS>0 and CR<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.
  4. More constants:
    l=PQ2qzc=ryrxqy+ryqxc=rzCRqz+PQrzc=sysxqy+syqxc=szCSqz+PQsz
    (A4-5)
  5. Calculate coordinates 3rz and 3sz
    First test if PQ and RS are parallel line pieces
    • 5a. If running parallel, i.e., when both 2ry = 2sy and 2rz = 2sz, then coordinates 3rz and 3szare equal to zero
      rz3=0,sz3=0
      (A4-6)
    • 5b. If PQ and RS in one plane, i.e., when ry2rz2=sy2sz2, or ry2rz2=sy2sz, thus if crycrz=csycsz or crycsz=crzcsy(see Expressing the Crossing Conditions in Terms of the Original Coordinates) but not running parallel, then coordinates 3rz and 3sz are given by
      rz3=lOr2,sz3=lOsx2'
      (A4-7)
      with (see Expressing the Crossing Conditions in Terms of the Original Coordinates)
      lO2r2=cry2+crz2l2,lO2s2=csy2+csz2l2
      (A4-8)
    • 5c. If PQ and RS not in one plane then coordinates 3rz and 3sz are obtained as follows
    • 5c1. Ratio fv
      fV=12cry2+crz2csy2csz2(crycsy)2+(crzcsz)2+12
      (A4-9)
    • 5c2. Coordinates and length of V
      Vy=1l(cry+fV(csycry))Vz=1l(crz+fV(cszcrz))lOV=Vy2+Vz2
      (A4-10)
    • 5c3. Coordinates 3rz and 3sz:
      rz3=Vzcry+VycrzllOV,sz3=Vzcsy+VycszllOV
      (A4-11)
  6. Test on crossing condition A that after the rotations line piece 3r3s intersects the XY-plane:
    rx3sx30
    (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.
  7. Coordinate ux:
    • 7a. If both line pieces are running parallel, thus both 3rz = 0 and 3sz = 0, a choice is made for the position ux as
      ux=(min(CR,PQ)max(0,CR))2, when CR>CS orux=(min(CS,PQ)max(0,CR))2, when CS>CR
      (A4-13)
    • 7b. If both line pieces are not running parallel then
      ux=CSrz3CRsz3rz3sz3
      (A4-14)
  8. Test on condition B2 that the intersection point is within the length of PQ
    0uxPQ
    (A4-15)
    If finally condition B2 is also fulfilled, then the line pieces are crossing and therefore proceed
  9. Ratios fT and fU:
    fT=uxPQ, and fU=uxCCSCR
    (A4-16)
  10. Coordinates of the endpoints T and U of the orthogonal distance TU between crossing line pieces PQ and RS, respectively:
Tx=Px+fT(QxPx)Ty=Py+fT(QyPy)Tz=Pz+fT(QzPz)
Ux=Rx+fU(SxRx)Uy=Ry+fU(SyRy)Uz=Rz+fU(SzRz)
(A4-17)
TU=(TxUx)2+(TyUy)2+(TzUz)2

Analytical approach

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

Shortest distance between two infinite lines

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+su with vector u=(QP)=(QxPxQyPyQzPz)
(A5-1)

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

B(t)=R+tv with vector v=(SR)=(SxRxSyRySzRz)
(A5-2)

Note that for s [set membership] [0, 1], the point A(s) is positioned on the line piece PQ, and that for t [set membership] [0, 1], the point B(t) is positioned on the line piece RS. Let vector w(s,t) connects a point A(s) on line A with a point B(t) on line B as

w(s,t)=A(s)B(t)=PR+sutv=w0+sutv
(A5-3)

with

w0=PR
(A5-4)

Lines A and B cross each other where the distance between points on both lines is the shortest, say at A(sc) and B(tc). The vector wc between these points then is orthogonal to line A and line B, and we obtain

uwc=0, and vwc=0
(A5-5)

such that

uw0+sc(uu)tc(uv)=0
(A5-6)

and

vw0+sc(vu)tc(vv)=0
(A5-7)

Let us define:

a=uu=(QxPx)2+  (QyPy)2+(QzPz)2b=uv=(QxPx)(SxRx)  +(QyPy)(SyRy)  +  (QzPz)(Sz  Rz)c=vv=(SxRx)2+  (SyRy)2+(SzRz)2d=uw0=(QxPx)(PxRx)  +(QyPy)(PyRy)  +  (QzPz)(PzRz)e=vw0=(SxRx)(PxRx)  +(Sy    Ry)(PyRy)  +  (SzRz)(PzRz)
(A5-8)

then we obtain

d+ascbtc=0 and e+bscctc=0
(A5-9)

and their solutions as

sc=becdacb2 and tc=aebdacb2
(A5-10)

With the solutions for sc and tc, the points A(sc) and B(tc) are defined and their distance can be calculated as

dist=|A(sc)B(tc)|=|w0+scutcv|==(w0x+scuxtcvx)2+(w0y+scuytcvy)2+(w0z+scuztcvz)2=(PxRx+sc(QxPx)tc(SxRx))2+(PyRy+sc(QyPy)tc(SyRy))2+(PzRz+sc(QzPz)tc(SzRz))2
(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 sc and tc. When they are both in the domain [0, 1], thus when

sc[0,1] and tc[0,1]
(A5-12)

then the points A(sc) and B(tc) are on the line pieces PQ and RS, respectively.

Figure A5.1

An external file that holds a picture, illustration, etc.
Object name is fncom-04-00148-a004.jpg

(A,B) Two line pieces PQ and RS and the infinite lines A and B through these line pieces. The infinite lines A and B cross each other at the location where the orthogonal connection line w is drawn intersecting the lines at A(sc) and B(tc). The line pieces PQ and RS in (A) are not crossing as they are not intersected by the orthogonal connection line, while in (B) they do cross.

Two particular cases need further attention.

Line pieces are running parallel

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 sc, say sc = 0, and then solving (Eq. A5-9) resulting in tc = 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.

Line pieces are not parallel but in one plane

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+su=R+tv or PR+s(QP)t(SR)=0

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

|PxRxQxPxSxRxPyRyQyPySyRyPzRzQzPzSzRz|=0

resulting in

s=bxcybycxaxbyaybx and t=axcyaycxaybxaxby

For the corresponding points A(s)=P+su and B(t)=R+tv, it has subsequently to be determined if they are located on the line segments PQ and RS, respectively.

Shortest distance between two non-crossing line pieces

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 PQ is given by the points on the line A (Figure A5.2):

A(s)=P+s(QP)=P+su with 0s1.

Figure A5.2

An external file that holds a picture, illustration, etc.
Object name is fncom-04-00148-a005.jpg

Three spatial configurations of non-crossing line pieces PQ (red) and RS (blue). The infinite lines A and B through PQ and RS, respectively, cross at the orthogonal connection line A(sc)B(tc)(green). The shortest distance between the line pieces depends on their spatial configuration and is depicted by the pink lines SQ in (A), SP in (C) and from S to some point on PQ in (B).

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

B(t)=R+t(SR)=R+tv with 0t1.

If the points A(sc) and B(tc) 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(sc) and B(tc) 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 w(s,t)=A(s)B(t)=w0+sutv between the line pieces. Minimizing the length of w(s,t) is equivalent to minimizing |w(s, t)|2, thus minimizing (w0+sutv)(w0+sutv). For the infinite lines this function has its true, global minimum at their crossing site (sc, tc). With the restrictions of 0 ≤ s  1 and 0 ≤ t  1, different configurations need to be distinguished. When the points A(sc) and B(tc) are outside both line pieces, the shortest distance is between the points of both line pieces closest to sc and tc, i.e., SQ in Figure A5.2A, and SP in Figure A5.2C. If only one of the points A(sc) and B(tc) is on its respective line piece the shortest distance is between some point on this line piece and the closest point on the other line piece. Suppose that A(sc) is on line piece PQ and the nearest point on line piece RS is S (i.e., t = 1) (see Figure A5.2B) then we need to minimize

|w2(1,t)|=(w0+suv)(w0+suv).

Taking the derivative with respect to s we obtain

0=d|w|2ds=2u(w0+suv) such that
s0=uvuw0uu

Therefore the shortest distance occurs between the points S and A(s0). A similar procedure applies for other configurations, with for instance B(tc) on line piece RS and a search for the closest point on PQ.

References

  • 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