/*----------------------------------------------------------------
%W%  %G%
ctt1209h.asc  translated Mon Dec 16 17:00:27 1996 by ntscable 2.0
source file syntax: Eutectic
output file syntax: CABLE
soma: diameter = 8.73342 um  length = 19.4613 um  area = 533.956 um2
      14 three-D points; 15 outline points numbered 1-15
      outline diameter = 13.3988 um
4 primary neurites
10 branches totaling 498.866 um in length, 585.845 um2 in area
147 tree points translated to 60 segments (1 requested)
Neurites divided into segments of equal dx between adjacent digitized
branch points.
Segment length constrained to be < 10 um.
No. points    162
No. trees       5
Text  T01209HO, retrograde HRP, Silver, 1/31/89                                                                               

----------------------------------------------------------------*/
					/* create sections */
create    soma,\
          dend1[1],\
          dend2[5],\
          dend3[9],\
          dend4[1]



/*----------------------------------------------------------------*/
proc geometry() { local i, j

						/* soma geometry */
    soma {
        nseg = 1
        pt3dclear()
        for j = 1, fscan() {
            pt3dadd(fscan(),fscan(),fscan(),fscan())
        }
    }

					/* connect primary neurites */
    soma connect dend1[0] (0), 0.5
    soma connect dend2[0] (0), 0.5
    soma connect dend3[0] (0), 0.5
    soma connect dend4[0] (0), 0.5


					/* neurite geometry*/
    for i = 0,0 {
        dend1[i] {
            nseg = fscan()
            pt3dclear()
            for j = 1, fscan() {
                pt3dadd(fscan(),fscan(),fscan(),fscan())
            }
        }
    }

    for i = 0,4 {
        dend2[i] {
            nseg = fscan()
            pt3dclear()
            for j = 1, fscan() {
                pt3dadd(fscan(),fscan(),fscan(),fscan())
            }
        }
    }

    for i = 0,8 {
        dend3[i] {
            nseg = fscan()
            pt3dclear()
            for j = 1, fscan() {
                pt3dadd(fscan(),fscan(),fscan(),fscan())
            }
        }
    }

    for i = 0,0 {
        dend4[i] {
            nseg = fscan()
            pt3dclear()
            for j = 1, fscan() {
                pt3dadd(fscan(),fscan(),fscan(),fscan())
            }
        }
    }



					/* branching topology*/
    for i = 1,0 {
        dend1[fscan()] connect dend1[i] (0), fscan()
    }

    for i = 1,4 {
        dend2[fscan()] connect dend2[i] (0), fscan()
    }

    for i = 1,8 {
        dend3[fscan()] connect dend3[i] (0), fscan()
    }

    for i = 1,0 {
        dend4[fscan()] connect dend4[i] (0), fscan()
    }

}

geometry()


SOMA COORDINATES AND DIAMETERS:

    14
      -8     -3.5        2        0
      -8     -1.5     1.75   4.0311
      -6    -1.35     0.55   9.7417
    -5.5       -1     0.25   10.595
    -3.5     -0.5     0.25   11.543
      -2    -0.35     0.25    11.83
      -1 -0.36111     0.25   12.234
     0.5 -0.27778      0.5   12.909
     1.5 -0.88889      0.5   12.154
     2.5     -1.5      0.5   11.402
       5  -2.5417  0.29167   8.4861
     5.5       -3    0.875   7.1107
       6       -3      1.5        5
     6.5     -4.5      1.5        0


NEURITE COORDINATES AND DIAMETERS:

    7 24
     0.5        6       -1      0.8
      -1        8       -3      0.9
      -3      8.5       -3      0.9
      -4     10.5       -3      0.9
      -3       13       -3      0.9
    -3.5     16.5       -4      0.8
    -3.5     18.5     -3.5      0.8
    -2.5     19.5     -3.5      0.8
      -4       20     -2.5      0.8
      -6     21.5       -3      0.4
      -8       22       -3      0.4
     -10     21.5     -2.5      0.4
     -11     23.5     -2.5      0.4
   -13.5     25.5       -2      0.4
   -17.5       24       -2      0.4
   -19.5       28       -2      0.4
   -23.5       28     -2.5      0.4
     -24     30.5     -3.5      0.1
     -23       35     -3.5      0.1
   -24.5       37     -3.5      0.1
     -29       35       -4      0.1
     -31       40     -3.5      0.1
     -34       42     -3.5      0.1
     -34       42     -3.5      0.1

    1 5
     2.5       -7        2      0.6
       5       -7        2      0.6
       7       -8        2      0.6
     6.5      -10      3.5      0.6
       5    -11.5      3.5      0.6

    1 4
       5    -11.5      3.5      0.6
       8      -11        4      0.1
      10      -12        4      0.1
      10      -12        4      0.1

    2 5
      10      -12        4      0.1
    12.5      -11        4      0.1
    14.5       -9        4      0.1
    18.5     -7.5        4      0.1
    20.5       -7        4      0.1

    2 5
      10      -12        4      0.1
     9.5    -15.5        3      0.1
      10    -17.5      2.5      0.1
    10.5      -20      1.5      0.1
    11.5    -21.5      0.5      0.1

    7 18
       5    -11.5      3.5      0.6
       4      -13      4.5      0.3
     3.5    -15.5      3.5      0.3
       2    -17.5      3.5      0.3
       2    -20.5      5.5      0.3
       1    -23.5      5.5      0.3
      -2    -26.5        6      0.3
      -4    -28.5      5.5      0.3
    -6.5    -32.5      5.5      0.3
    -6.5      -36        6      0.3
    -7.5      -38        6      0.2
    -8.5    -42.5      4.5      0.2
   -10.5    -46.5        5      0.2
   -13.5      -51        7      0.2
   -15.5      -55        7      0.2
     -18      -59        7      0.2
     -20    -64.5        7      0.2
   -21.5    -68.5        6      0.2

    3 5
      -8     -3.5        2      0.9
   -12.5       -9       10      1.5
   -16.5    -14.5       11      1.5
     -19      -19     11.5      1.5
     -19      -19     11.5      1.2

    1 2
     -19      -19     11.5      1.2
   -16.5      -20     11.5      1.1

    3 11
   -16.5      -20     11.5      1.1
     -13      -18       12      0.1
     -12    -19.5     11.5      0.1
   -10.5    -19.5     11.5      0.1
    -9.5    -16.5     11.5      0.1
      -7    -16.5     11.5      0.1
    -6.5    -17.5     11.5      0.1
    -4.5      -14     11.5      0.1
      -3    -15.5     11.5      0.1
    -0.5    -15.5     11.5      0.1
    -0.5    -15.5     11.5      0.1

    7 17
   -16.5      -20     11.5      1.1
   -16.5    -22.5       11      0.7
   -15.5    -23.5     13.5      0.7
     -17      -26     13.5      0.7
     -17    -30.5       14      0.7
   -17.5      -37       15      0.3
     -19    -41.5     15.5      0.3
     -20    -43.5     15.5      0.3
     -23    -45.5     15.5      0.3
     -25    -47.5     15.5      0.3
   -27.5      -49     15.5      0.3
     -30      -51     15.5      0.3
     -34    -53.5     15.5      0.3
   -37.5      -58     17.5      0.3
     -39    -61.5       17      0.3
     -45      -68     18.5      0.3
     -45      -68     18.5      0.3

    2 5
     -19      -19     11.5      1.2
     -21    -19.5       15      1.1
     -23    -21.5     17.5      1.1
   -26.5    -24.5       19      1.1
   -30.5    -27.5     18.5      1.1

    3 8
   -30.5    -27.5     18.5      1.1
     -32      -26     19.5      0.1
     -36    -26.5     19.5      0.1
   -39.5    -27.5     19.5      0.1
     -42    -29.5     19.5      0.1
   -44.5      -30     19.5      0.1
     -48    -32.5       20      0.1
   -51.5    -34.5     19.5      0.1

    1 4
   -30.5    -27.5     18.5      1.1
   -30.5      -29     18.5      0.6
   -32.5    -31.5     18.5      0.6
   -33.5    -33.5     18.5      1.1

    7 11
   -33.5    -33.5     18.5      1.1
     -36    -35.5       18      0.1
     -39      -37     18.5      0.1
     -43    -38.5       19      0.1
     -50      -43       16      0.1
   -55.5      -46     16.5      0.1
     -61      -51       17      0.1
     -67    -56.5       16      0.1
     -72    -61.5       16      0.1
     -78    -66.5     16.5      0.1
     -81      -69       14      0.1

    10 30
   -33.5    -33.5     18.5      1.1
   -33.5      -37       19      0.3
     -32      -41       19      0.3
   -31.5    -43.5       19      0.3
     -29    -44.5       19      0.3
   -28.5      -46       19      0.3
     -26      -46       19      0.3
     -25      -50     19.5      0.3
   -22.5      -50     19.5      0.3
   -21.5      -48     19.5      0.3
     -19    -50.5       18      0.3
     -16    -48.5       18      0.3
     -16    -51.5       18      0.3
     -13      -51     17.5      0.3
   -11.5      -54     17.5      0.3
     -10    -53.5     17.5      0.3
    -6.5    -56.5     17.5      0.3
    -3.5    -56.5     17.5      0.3
      -2      -60       18      0.3
     0.5      -60     18.5      0.3
     1.5      -65     18.5      0.3
       4      -68     18.5      0.3
     6.5    -67.5     21.5      0.3
     6.5      -71       22      0.3
     8.5      -73       22      0.3
       7      -77       22      0.3
       7      -80       22      0.3
       7      -85       22      0.3
       7    -88.5       22      0.3
       7    -88.5       22      0.3

    2 5
      -8      0.5      1.5      0.1
    -8.5        3        3      0.1
      -6      4.5        6      0.1
   -10.5      5.5      9.5      0.1
   -10.5      5.5      9.5      0.1


CONNECTIONS:

        0    1
        1    1
        1    1
        0    1

        0    1
        1    1
        1    1
        0    1
        4    1
        4    1
        6    1
        6    1



/*----------------------------------------------------------------*/
proc geometry() { 

	/* NULL geometry procedure: keeps the user from
	calling the geometry procedure in isolation. */

    printf("\nYou must re-read the entire geometry\n")
    printf("file to execute geometry().\n\n")
}