/*----------------------------------------------------------------
%W%  %G%
ctt1209d.asc  translated Mon Dec 16 17:00:24 1996 by ntscable 2.0
source file syntax: Eutectic
output file syntax: CABLE
soma: diameter = 10.7008 um  length = 20.158 um  area = 677.661 um2
      16 three-D points; 18 outline points numbered 1-18
      outline diameter = 13.9914 um
3 primary neurites
9 branches totaling 314.063 um in length, 291.098 um2 in area
93 tree points translated to 38 segments (1 requested)
Neurites divided into segments of equal dx between adjacent digitized
branch points.
Segment length constrained to be < 10 um.
No. points    111
No. trees       4
Text  T01209DO, HRP, silver enhanced, 1/31/89                                                                                 

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



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


					/* neurite geometry*/
    for i = 0,2 {
        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())
            }
        }
    }

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



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

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

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

}

geometry()


SOMA COORDINATES AND DIAMETERS:

    16
    -6.5        0     -0.5        0
      -6  -1.1875  -0.5625   3.6272
    -5.5   -2.625   -0.375   7.7862
    -4.5     -3.5        0   12.166
      -3     -1.5       -1   16.492
    -1.5    -1.25   -0.875   16.921
      -1 -0.41667 -0.58333   15.729
       0  0.41667 -0.66667   14.633
     0.5  0.78571 -0.67857    13.98
     2.5   1.9286 -0.39286    12.18
     3.5    2.375    -0.25   11.524
     4.5    2.625   -0.375   10.612
     5.5    3.125   -0.625    9.172
     6.5     2.75    -0.25   5.7009
     6.5     3.75    -0.75   3.5355
       7      4.5     -0.5        0


NEURITE COORDINATES AND DIAMETERS:

    1 3
       7        4     -0.5      0.7
       8        4      1.5      0.7
       8        4      7.5      0.7

    3 11
       8        4      7.5      0.7
     9.5      0.5      7.5      0.1
      11        0      7.5      0.1
    12.5        0      7.5      0.1
      14       -2      5.5      0.1
      17       -2      5.5      0.1
      19       -3        4      0.1
    21.5       -3      4.5      0.1
    24.5       -1      4.5      0.1
    25.5      1.5      4.5      0.1
    25.5      1.5      4.5      0.1

    2 7
       8        4      7.5      0.7
      10      5.5      7.5      0.4
      11      7.5        8      0.4
      12        8       10      0.1
      15      9.5       11      0.1
    17.5       11     11.5      0.1
      19       12     11.5      0.1

    1 2
    -1.5     -4.5        0        1
      -3     -7.5        5      1.4

    6 19
      -3     -7.5        5      1.4
    -1.5      -11      3.5      0.9
     0.5    -12.5      6.5      0.9
       2      -16        9      0.9
     2.5    -18.5        9      0.9
       1    -20.5        8      0.6
    -1.5      -22       10      0.4
    -4.5    -22.5       10      0.4
      -6      -23       10      0.2
    -5.5      -24       10      0.2
      -9    -25.5     10.5      0.2
    -9.5    -27.5      9.5      0.2
     -12      -28     10.5      0.2
     -14      -30      9.5      0.2
   -16.5    -32.5        8      0.2
   -19.5      -35      7.5      0.2
     -18    -38.5        8      0.2
   -18.5    -40.5        7      0.2
     -19    -43.5        7      0.2

    2 6
      -3     -7.5        5      1.4
    -5.5     -7.5      5.5      0.7
      -7       -9      7.5      0.7
     -10    -10.5      7.5      1.8
     -12    -12.5      7.5      0.7
     -15    -15.5        8      0.7

    5 13
     -15    -15.5        8      0.7
     -17    -13.5      7.5      0.4
     -19      -13      7.5      0.4
   -22.5      -15      7.5      0.4
     -24      -13      7.5      0.4
   -27.5    -14.5      7.5      0.4
   -29.5      -13        6      0.4
   -33.5      -13      6.5      0.4
   -36.5      -13       12      0.2
     -41      -14       12      0.2
     -47    -13.5       17      0.2
     -51      -13     16.5      0.1
     -51      -13     16.5      0.1

    1 2
     -15    -15.5        8      0.7
     -17      -18      5.5      0.3

    1 4
     -17      -18      5.5      0.3
     -16      -20        5      0.1
   -13.5      -20        6      0.1
   -12.5    -20.5        7      0.1

    1 3
     -17      -18      5.5      0.3
   -20.5      -20      5.5      0.1
     -23      -23      5.5      0.1

    2 7
     -23      -23      5.5      0.1
     -26    -25.5      5.5      0.1
     -27    -28.5        5      0.1
   -27.5    -31.5        5      0.1
   -28.5      -34        5      0.1
   -28.5      -37      7.5      0.1
     -28      -40        7      0.1

    5 11
     -23      -23      5.5      0.1
   -23.5      -25      3.5      0.1
   -24.5      -29        5      0.1
     -30    -31.5      4.5      0.1
     -33      -34      4.5      0.1
   -35.5      -37        4      0.1
   -37.5    -40.5        4      0.1
     -41    -43.5      8.5      0.1
   -44.5      -47        7      0.1
     -45      -50        7      0.1
   -44.5    -53.5      7.5      0.1

    1 3
    -2.5        5     -0.5      0.1
      -4        5      7.5      0.1
    -5.5      5.5      7.5      0.1

    2 7
    -5.5      5.5      7.5      0.1
      -5        7        9      0.1
      -4        8      9.5      0.1
      -6       10        9      0.1
      -6     13.5      6.5      0.1
    -9.5     16.5      6.5      0.1
    -9.5     19.5      6.5      0.1

    4 7
    -5.5      5.5      7.5      0.1
      -8      2.5      7.5      0.1
   -11.5        1        8      0.1
   -16.5       -2       10      0.1
   -21.5       -5     11.5      0.1
     -26       -9     12.5      0.1
     -31      -14       12      0.1


CONNECTIONS:
        0    1
        0    1

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

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