/*----------------------------------------------------------------
%W%  %G%
ctt1209b.asc  translated Mon Dec 16 17:00:22 1996 by ntscable 2.0
source file syntax: Eutectic
output file syntax: CABLE
soma: diameter = 9.93713 um  length = 20.2765 um  area = 632.999 um2
      16 three-D points; 19 outline points numbered 1-19
      outline diameter = 13.4639 um
2 primary neurites
9 branches totaling 334.312 um in length, 533.958 um2 in area
97 tree points translated to 42 segments (1 requested)
Neurites divided into segments of equal dx between adjacent digitized
branch points.
Segment length constrained to be < 10 um.
No. points    116
No. trees       3
Text  T01209BO,retrograde HRP, silver enhanced, 1/27/89                                                                       

----------------------------------------------------------------*/
					/* create sections */
create    soma,\
          dend1[7],\
          dend2[9]



/*----------------------------------------------------------------*/
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


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

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



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

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

}

geometry()


SOMA COORDINATES AND DIAMETERS:

    16
    -6.5       -2       -3        0
      -6    -2.25   -2.375   3.5089
    -5.5  -1.8333       -2   5.7542
    -4.5     -1.5       -2   9.0554
      -4    -1.75       -2   11.543
      -3    -1.25   -1.125   13.521
      -2     -0.8    -0.75   15.672
    -0.5  -1.1429 -0.53571   16.825
       1 -0.28571 -0.82143    15.79
     1.5    0.375    -0.25   14.468
       2   1.0357  0.32143   13.174
       3   1.8571  0.46429   11.872
     4.5   3.2143  0.92857   9.6097
       5        5      1.5   6.0828
     5.5     6.25     2.25   3.5355
       7        8        2        0


NEURITE COORDINATES AND DIAMETERS:

    1 3
     6.5      8.5        3      0.6
     9.5       11      4.5      0.6
      13     12.5      4.5      0.6

    1 4
      13     12.5      4.5      0.6
    15.5     14.5        6      0.5
    17.5       15        6      0.5
      19       15      7.5      0.7

    1 4
      19       15      7.5      0.7
    20.5     16.5      7.5      0.1
    23.5       18        8      0.1
    25.5       19        8      0.1

    5 15
      19       15      7.5      0.7
    21.5       14        9      0.4
      23       11        8      0.4
      24        9       10      0.4
    25.5      7.5     10.5      0.4
    29.5      8.5       12      0.4
      30     11.5     14.5      0.4
      32     13.5     14.5      0.2
      35       17     16.5      0.2
    36.5       17     16.5      0.2
    40.5       14       19      0.2
      42       12       19      0.2
      45     10.5     20.5      0.2
    47.5      9.5       21      0.2
    48.5        9       20      0.1

    1 3
      13     12.5      4.5      0.6
      13     14.5      3.5      0.1
    13.5       16        4      0.1

    1 4
    13.5       16        4      0.1
      12       19        6      0.1
    11.5     22.5        6      0.1
    11.5     22.5        6      0.1

    6 17
    13.5       16        4      0.1
    15.5       16        1      0.1
      16       17      1.5      0.1
      17       19      1.5      0.1
      18     22.5        3      0.1
    21.5       22      3.5      0.1
      24     22.5      3.5      0.1
    27.5       25        4      0.1
      30     24.5        3      0.1
      31     27.5      4.5      0.1
      31       30      4.5      0.1
      31     33.5        3      0.1
    30.5     38.5      4.5      0.1
      30       40        3      0.1
      27       43      5.5      0.1
      24     44.5      5.5      0.1
    23.5     44.5        8      0.1

    3 6
    -0.5       -8     -3.5      2.6
      -1      -14       -6      1.4
       0      -16     -4.5      3.1
     2.5    -23.5      1.5        2
       4      -28        4        2
     4.5    -28.5        8        2

    2 6
     4.5    -28.5        8        2
       8    -30.5        7        1
      11      -32        8        1
    16.5    -33.5      7.5        1
      19    -34.5      9.5        1
      19    -34.5      9.5      0.6

    3 10
      19    -34.5      9.5      0.6
    21.5    -31.5      8.5      0.1
    23.5    -31.5       10      0.1
    24.5    -30.5     11.5      0.1
      26    -29.5     11.5      0.1
    27.5      -29       11      0.1
      29      -32     13.5      0.1
      31      -34       14      0.1
      31    -38.5       10      0.1
    29.5    -39.5       10      0.1

    2 4
      19    -34.5      9.5      0.6
    21.5    -37.5       10      0.1
    24.5    -41.5     14.5      0.1
      25    -43.5       16      0.1

    2 4
     4.5    -28.5        8        2
       3      -31        5      1.1
       2      -36      5.5        2
       2      -36        3      0.2

    1 2
       2      -36        3      0.2
     0.5      -40        3      0.2

    5 14
     0.5      -40        3      0.2
      -2    -42.5      3.5      0.2
    -3.5    -45.5      2.5      0.2
    -4.5      -47      1.5      0.2
      -7    -46.5      1.5      0.2
      -9      -48      0.5      0.2
     -14    -49.5       -1      0.2
     -17    -49.5       -2      0.2
     -21    -50.5       -2      0.2
   -24.5      -51     -3.5      0.2
     -27      -52     -3.5      0.2
   -29.5      -52     -4.5      0.2
     -31      -56     -5.5      0.2
   -34.5    -57.5       -7      0.2

    2 5
     0.5      -40        3      0.2
     2.5    -42.5      4.5      0.2
       2      -47        5      0.1
     4.5    -50.5        5      0.1
       5      -52      5.5      0.1

    5 10
       2      -36        3      0.2
     4.5      -37        9        1
       6      -40      9.5      0.8
     5.5      -44       10      0.6
     4.5      -45     19.5      0.4
     5.5      -47     20.5      0.4
       7    -52.5     19.5      0.4
       7    -56.5     19.5      0.4
       9    -61.5       21      0.4
       9    -61.5       21      0.4


CONNECTIONS:
        0    1
        1    1
        1    1
        0    1
        4    1
        4    1

        0    1
        1    1
        1    1
        0    1
        4    1
        5    1
        5    1
        4    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")
}