/*----------------------------------------------------------------
%W%  %G%
ctt1209g.asc  translated Mon Dec 16 17:00:27 1996 by ntscable 2.0
source file syntax: Eutectic
output file syntax: CABLE
soma: diameter = 9.84359 um  length = 17.8897 um  area = 553.23 um2
      14 three-D points; 15 outline points numbered 1-15
      outline diameter = 14.3841 um
4 primary neurites
11 branches totaling 493.165 um in length, 904.891 um2 in area
139 tree points translated to 46 segments (1 requested)
Neurites divided into segments of equal dx between adjacent digitized
branch points.
Segment length constrained to be < 10 um.
No. points    154
No. trees       5
Text  T01209GO, HRP, Silver enhanced, 1/31/89                                                                                 

----------------------------------------------------------------*/
					/* create sections */
create    soma,\
          dend1[0],\
          dend2[11],\
          dend3[1],\
          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,-1 {
        dend1[i] {
            nseg = fscan()
            pt3dclear()
            for j = 1, fscan() {
                pt3dadd(fscan(),fscan(),fscan(),fscan())
            }
        }
    }

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

    for i = 0,0 {
        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,-1 {
        dend1[fscan()] connect dend1[i] (0), fscan()
    }

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

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

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

}

geometry()


SOMA COORDINATES AND DIAMETERS:

    14
    -7.5        4       -1        0
      -7   2.9167       -1   3.8333
    -6.5   1.8333       -1   7.6667
      -6   1.8125       -1    9.375
    -4.5     0.75       -1     12.5
      -3    0.625       -1    13.75
    -0.5        0       -1       15
       0  0.11111       -1   14.778
       2 0.055556    -1.25   12.899
       4     -0.3    -1.25   10.412
     4.5 -0.29167  -1.2917   9.5924
       6 -0.41667  -1.4167   6.8354
       7 -0.83333     -1.5   4.3333
     7.5      0.5     -1.5        0


NEURITE COORDINATES AND DIAMETERS:

    2 5
      -2        0     -0.5      2.2
    -1.5      4.5        3        2
    -1.5        9        5        2
       0       13        8        2
       1       15      7.5        2

    2 5
       1       15      7.5        2
       3       17        8      1.3
     6.5     20.5       11      1.3
      10     23.5       12      1.3
      13       26     12.5      1.9

    10 21
      13       26     12.5      1.9
      18       27     12.5      1.1
      21       28     12.5      1.1
      25     29.5       13      1.1
      28       32     13.5      1.1
      31     32.5      8.5      0.5
      35     33.5        8      0.5
    40.5     34.5      8.5      0.5
      42     35.5      8.5      0.5
    45.5     37.5      8.5      0.3
    48.5       39        8      0.3
    52.5     38.5      8.5      0.3
    56.5     40.5        8      0.3
      60     42.5        8      0.3
    64.5     43.5        8      0.3
    67.5     47.5      5.5      0.3
      70     53.5      5.5      0.3
      75     59.5      5.5      0.3
    77.5       65      2.5      0.3
    78.5     70.5      2.5      0.3
      79       77     -0.5      0.3

    3 5
      13       26     12.5      1.9
      15     28.5       11      0.3
    19.5       32       12      0.3
      24       36      9.5      0.3
      26     38.5        6      0.1

    3 8
       1       15      7.5        2
    -0.5     15.5      8.5        2
      -3       18        8        2
    -1.5       21        8        2
    -2.5       23       10        2
    -1.5       25       10      1.8
       0       28       11      1.1
     4.5     31.5        9        1

    4 10
     4.5     31.5        9        1
     8.5     33.5      8.5      0.6
      12     35.5        9      0.6
    18.5       38        9      0.4
      20     39.5        9      0.4
      23       40      9.5      0.4
      31       46      8.5      0.4
    32.5     46.5      8.5      0.1
    35.5       46      8.5      0.1
      37       47        9      0.1

    2 4
      37       47        9      0.1
      38       51        9      0.1
      39       56      7.5      0.1
      41     56.5        8      0.1

    3 9
      37       47        9      0.1
    39.5       46        9      0.1
    42.5     46.5        9      0.1
    45.5       46        9      0.1
      48     46.5       11      0.1
      51     47.5       11      0.1
      54     45.5       12      0.1
      59     45.5       12      0.1
      59     45.5       12      0.1

    2 4
     4.5     31.5        9        1
     5.5     34.5      9.5      0.1
       7     39.5      6.5      0.1
     7.5     40.5      6.5      0.1

    2 4
     7.5     40.5      6.5      0.1
       8       46      7.5      0.1
     9.5     48.5        8      0.1
      12     52.5      7.5      0.1

    3 7
     7.5     40.5      6.5      0.1
      11     42.5        6      0.1
    14.5       45      5.5      0.1
    18.5       49      5.5      0.1
    23.5     55.5      5.5      0.1
    25.5       61      5.5      0.1
    25.5       61      5.5      0.1

    3 9
    -8.5      3.5     -3.5      3.2
     -13        4     -7.5        2
     -17      3.5     -7.5      1.2
     -21        5     -7.5      1.2
     -22        5     -6.5      1.2
   -24.5      4.5     -6.5      0.3
     -26        4       -8      0.3
     -28        7       -8      0.3
     -28        7       -8      0.3

    6 17
      -8     -3.5      -10      0.3
    -7.5       -6     -9.5      0.3
      -9       -6     -9.5      0.3
      -9     -8.5     -9.5      0.3
   -11.5    -11.5      -11      0.3
     -13    -14.5       -9      0.3
     -15    -17.5       -9      0.3
   -16.5    -20.5       -9      0.3
   -19.5    -24.5       -9      0.3
   -20.5    -26.5       -9      0.3
   -20.5      -29       -9      0.3
   -21.5      -32       -7      0.3
     -24      -37       -4      0.3
   -25.5      -41       -4      0.3
   -27.5      -44     -3.5      0.3
     -29      -48     -3.5      0.3
   -29.5    -50.5       -4      0.3


CONNECTIONS:

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