/* Dentage Gyrus Granule Cell model associated with the papers: 

J. Tejada, G.M. Arisi, N. Garcia-Cairasco, A.C. Roque, Morphological alterations in newly born dentate gyrus granule cells that emerge after status epilepticus contribute to make them less excitable, PLoS ONE. 7 (2012) e40726. doi:10.1371/journal.pone.0040726.

J. Tejada, N. Garcia-Cairasco, A.C. Roque, Combined role of seizure-induced dendritic morphology alterations and spine loss in newborn granule cells with mossy fiber sprouting on the hyperexcitability of a computer model of the dentate gyrus, PLoS Comput. Biol. 10 (2014) e1003601. doi:10.1371/journal.pcbi.1003601.

julian.tejada@gmail.com - 2014  */

//Defining granule cell

	begintemplate GranuleCell52

// Original name on neuroMorpho.org 512882.CNG.hoc

ndend1=35

  
public  pre_list, connect_pre, subsets, is_art, is_connected
public  vbc2gc, vmc2gc, vhc2gc, vgc2bc, vbc2bc, vmc2bc, vhc2bc, vgc2mc, vbc2mc, vmc2mc, vhc2mc, vgc2hc, vmc2hc
public soma, dend
public all, gcldend, pdend, mdend, ddend

nst=10
	objectvar stim[nst]
double stimdur[nst], stimdel[nst], stimamp[nst]
public stim, stimdur, stimamp, stimdel
create soma, dend[ndend1]
objref syn, pre_list


proc init() {
	pre_list = new List()
	subsets()
	gctemp()
	synapse()
}
objref all, gcldend, pdend, mdend, ddend
proc subsets(){ local i
	objref all, gcldend, pdend, mdend, ddend
	all = new SectionList()
		soma all.append()
		for i=0, 34 dend[i] all.append()


	gcldend  = new SectionList()
		dend[0] gcldend.append()


	pdend  = new SectionList()
		for i=1, 3  dend[i] pdend.append()
		dend[6]  pdend.append()
		dend[15] pdend.append()  
		for i=22, 23  dend[i] pdend.append()
		dend[28] pdend.append()


	mdend  = new SectionList()
		
		dend[7] mdend.append()  
		dend[12] mdend.append()
		dend[16] mdend.append()
		dend[18] mdend.append()
		dend[25] mdend.append()
		dend[29] mdend.append()
		dend[32] mdend.append()
		
		
	ddend  = new SectionList()
		for i=4, 5  dend[i] ddend.append()
		for i=8, 11 dend[i] ddend.append()
		for i=13, 14 dend[i] ddend.append()
		dend[17] ddend.append()  
		for i=19, 21 dend[i] ddend.append()
		dend[24] ddend.append()  
		for i=26, 27 dend[i] ddend.append()
		for i=30, 31 dend[i] ddend.append()
		for i=33, 34 dend[i] ddend.append()

}
proc gctemp() {

    
	forsec all {
		insert ccanl
	catau_ccanl = 10
	caiinf_ccanl = 0.000005
	Ra=210
	}

	soma {insert ichan2  //ildikos ichan
	gnatbar_ichan2=0.12  //original 0.030 to .055 
	gkfbar_ichan2=0.016  //original 0.015
	gksbar_ichan2=0.006
		insert borgka
	gkabar_borgka=0.012
		insert nca  // HAV-N- Ca channel
	gncabar_nca=0.002  // check to modify- original 0.004
		insert lca 
	glcabar_lca=0.005
		insert cat
	gcatbar_cat=0.000037
		insert gskch
	gskbar_gskch=0.001
		insert cagk
	gkbar_cagk=0.0006
	gl_ichan2 = 0.00004
	cm=1

} 

		forsec gcldend {insert ichan2
	gnatbar_ichan2=0.018  //original 0.015
	gkfbar_ichan2=0.004
	gksbar_ichan2=0.006
		insert nca  // HAV-N- Ca channel
	gncabar_nca=0.003  // check to modify- original 0.004
		insert lca 
	glcabar_lca=0.0075
		insert cat
	gcatbar_cat=0.000075
		insert gskch
	gskbar_gskch=0.0004
		insert cagk
	gkbar_cagk=0.0006
	gl_ichan2 = 0.00004
	cm=1}
		
		forsec pdend {insert ichan2
	gnatbar_ichan2=0.013 
	gkfbar_ichan2=0.004
	gksbar_ichan2=0.006
		insert nca  // HAV-N- Ca channel
	gncabar_nca=0.001  // check to modify- original 0.004
		insert lca 
	glcabar_lca=0.0075
		insert cat
	gcatbar_cat=0.00025
		insert gskch
	gskbar_gskch=0.0002
		insert cagk
	gkbar_cagk=0.001
	gl_ichan2 = 0.000063
	cm=1.0 
        insert pas 
      g_pas = 4e-05
	}
		
	 	forsec mdend {insert ichan2
	gnatbar_ichan2=0.008 
	gkfbar_ichan2=0.001
	gksbar_ichan2=0.006
		insert nca  // HAV-N- Ca channel
	gncabar_nca=0.001  // check to modify- original 0.004
		insert lca 
	glcabar_lca=0.0005
		insert cat
	gcatbar_cat=0.0005
		insert gskch
	gskbar_gskch=0.0
		insert cagk
	gkbar_cagk=0.0024
	gl_ichan2 = 0.000063

	cm=1.0 
        insert pas 
      g_pas = 4e-05}

		forsec ddend {insert ichan2
	gnatbar_ichan2=0.008 
	gkfbar_ichan2=0.001
	gksbar_ichan2=0.008
		insert nca  // HAV-N- Ca channel
	gncabar_nca=0.001  // check to modify- original 0.004
		insert lca 
	glcabar_lca=0.0
		insert cat
	gcatbar_cat=0.001
		insert gskch
	gskbar_gskch=0.0
		insert cagk
	gkbar_cagk=0.0024
	gl_ichan2 = 0.000063
	cm=1.0 
        insert pas 
      g_pas = 4e-05}
		
	/*
	forsec all {
		insert ccanl
	catau_ccanl = 10
	caiinf_ccanl = 0.000005
	Ra=210
	}*/

	 forsec all {enat = 45 ekf = -90 eks = -90  ek=-90  elca=130 etca=130	 esk=-90
		 el_ichan2 =-70	cao_ccanl=2 }


  connect dend(0), soma(1)
  for i = 1, 4 connect dend[i](0), dend[i-1](1)
  connect dend[5](0), dend[3](1)
  connect dend[6](0), dend[2](1)
  for i = 7, 9 connect dend[i](0), dend[i-1](1)
  connect dend[10](0), dend[8](1)
  connect dend[11](0), dend[7](1)
  connect dend[12](0), dend[6](1)
  for i = 13, 14 connect dend[i](0), dend[12](1)
  connect dend[15](0), dend[1](1)
  for i = 16, 17 connect dend[i](0), dend[i-1](1)
  connect dend[18](0), dend[16](1)
  for i = 19, 20 connect dend[i](0), dend[18](1)
  connect dend[21](0), dend[15](1)
  connect dend[22](0), dend(1)
  for i = 23, 24 connect dend[i](0), dend[i-1](1)
  connect dend[25](0), dend[23](1)
  for i = 26, 27 connect dend[i](0), dend[25](1)
  connect dend[28](0), dend[22](1)
  for i = 29, 30 connect dend[i](0), dend[i-1](1)
  connect dend[31](0), dend[29](1)
  connect dend[32](0), dend[28](1)
  for i = 33, 34 connect dend[i](0), dend[32](1)
  basic_shape()
}
proc shape3d_1() {
  soma {pt3dclear()
	pt3dadd(0, 0, 0, 4.38576)
	pt3dadd(-1.4, 21.35, 0, 3.15)
  }
  dend {pt3dclear()
	pt3dadd(-1.4, 21.35, 0, 2.7)
	pt3dadd(-2.08, 24.45, -2.86, 2.7)
  }
  dend[1] {pt3dclear()
	pt3dadd(-2.08, 24.45, -2.86, 2.7)
	pt3dadd(-1.55, 29.85, -4.78, 2.7)
	pt3dadd(-1.55, 31.66, -4.78, 2.7)
	pt3dadd(-1.55, 32.78, -4.78, 2.7)
  }
  dend[2] {pt3dclear()
	pt3dadd(-1.55, 32.78, -4.78, 2.7)
	pt3dadd(-1.81, 35.94, -7.82, 2.25)
	pt3dadd(-0.22, 39.54, -9.83, 2.25)
	pt3dadd(0.31, 42.92, -12.02, 2.25)
	pt3dadd(1.63, 45.4, -15.18, 2.25)
	pt3dadd(2.06, 48.35, -16.84, 2.25)
	pt3dadd(2.86, 50.16, -19.86, 2.25)
  }
  dend[3] {pt3dclear()
	pt3dadd(2.86, 50.16, -19.86, 2.25)
	pt3dadd(2.06, 52.86, -19.86, 1.8)
	pt3dadd(0.21, 58.1, -20.05, 1.8)
	pt3dadd(-1.12, 61.03, -19.5, 1.8)
	pt3dadd(-1.38, 63.06, -22.62, 1.8)
	pt3dadd(-1.65, 67.79, -25.82, 1.8)
	pt3dadd(-2.97, 72.52, -26.59, 1.8)
	pt3dadd(-4.03, 76.35, -27.81, 1.8)
	pt3dadd(-6.45, 85.19, -29.3, 1.8)
	pt3dadd(-8.04, 90.59, -31.33, 1.8)
	pt3dadd(-9.63, 96, -33.47, 1.8)
	pt3dadd(-12.25, 101.43, -33.94, 1.8)
	pt3dadd(-14.1, 109.77, -36.59, 1.8)
	pt3dadd(-15.95, 116.98, -39.03, 1.8)
	pt3dadd(-18.52, 122.03, -40.42, 1.8)
	pt3dadd(-19.32, 125.19, -42.58, 1.8)
	pt3dadd(-20.11, 126.76, -42.58, 1.8)
  }
  dend[4] {pt3dclear()
	pt3dadd(-20.11, 126.76, -42.58, 1.8)
	pt3dadd(-19.85, 129.69, -42.58, 1.8)
	pt3dadd(-21.17, 134.65, -44.7, 1.8)
	pt3dadd(-22.59, 141.18, -44.7, 1.8)
	pt3dadd(-23.12, 146.14, -45.34, 1.8)
	pt3dadd(-23.38, 152.22, -45.34, 1.8)
	pt3dadd(-23.65, 156.28, -45.34, 1.8)
	pt3dadd(-25.19, 162.51, -46.81, 1.8)
	pt3dadd(-25.72, 167.24, -48.6, 1.8)
	pt3dadd(-27.57, 171.52, -50.68, 1.8)
	pt3dadd(-28.63, 175.8, -51.36, 1.8)
	pt3dadd(-29.99, 180.13, -52.73, 1.8)
	pt3dadd(-30.78, 188.24, -54.67, 1.8)
	pt3dadd(-30.52, 190.94, -54.67, 1.8)
	pt3dadd(-29.99, 195.67, -55.54, 1.8)
	pt3dadd(-31.65, 200.61, -55.94, 1.8)
	pt3dadd(-32.45, 208.94, -58.54, 1.8)
	pt3dadd(-33.51, 218.18, -60.5, 1.8)
	pt3dadd(-34.46, 222.91, -60.94, 1.8)
	pt3dadd(-35.25, 230.34, -62.29, 1.8)
	pt3dadd(-36.31, 236.42, -62.64, 1.8)
	pt3dadd(-37.37, 244.76, -62.88, 1.8)
	pt3dadd(-38.99, 252.03, -65, 1.8)
	pt3dadd(-38.99, 256.99, -65, 1.8)
	pt3dadd(-38.46, 261.72, -66.66, 1.8)
	pt3dadd(-37.14, 267.8, -66.66, 1.8)
	pt3dadd(-37.73, 275.46, -67.66, 1.8)
	pt3dadd(-37.99, 281.77, -70.04, 1.8)
	pt3dadd(-37.46, 285.37, -70.04, 1.8)
	pt3dadd(-36.94, 288.98, -72.59, 1.8)
	pt3dadd(-37.53, 297.76, -71.76, 1.8)
	pt3dadd(-37, 306.55, -76.81, 1.8)
	pt3dadd(-35.94, 316.01, -77.12, 1.8)
	pt3dadd(-36, 320.28, -80.55, 1.8)
	pt3dadd(-34.41, 323.66, -80.55, 1.8)
	pt3dadd(-33.88, 332.67, -80.79, 1.8)
	pt3dadd(-32.56, 336.27, -83.86, 1.8)
	pt3dadd(-30.02, 338.93, -87.34, 1.8)
	pt3dadd(-27.1, 340.96, -86.59, 1.8)
  }
  dend[5] {pt3dclear()
	pt3dadd(-20.11, 126.76, -42.58, 1.8)
	pt3dadd(-26.42, 136.29, -45.42, 1.8)
	pt3dadd(-29.07, 141.02, -48.34, 1.8)
	pt3dadd(-31.19, 144.17, -47.56, 1.8)
	pt3dadd(-33.57, 148.68, -49.35, 1.8)
	pt3dadd(-38.98, 154.35, -52.57, 1.8)
	pt3dadd(-41.1, 159.76, -54.61, 1.8)
	pt3dadd(-46.93, 167.42, -54.66, 1.8)
	pt3dadd(-52.22, 175.53, -56.54, 1.8)
	pt3dadd(-56.05, 179.91, -58.33, 1.8)
	pt3dadd(-55.52, 181.71, -58.33, 1.8)
	pt3dadd(-57.37, 183.96, -61.05, 1.8)
	pt3dadd(-58.7, 187.56, -61.05, 1.8)
	pt3dadd(-59.75, 188.92, -61.05, 1.8)
	pt3dadd(-61.08, 191.39, -61.05, 1.8)
	pt3dadd(-62.67, 193.87, -61.05, 1.8)
	pt3dadd(-64.19, 195.63, -61.05, 1.8)
	pt3dadd(-65.25, 198.11, -61.58, 1.8)
	pt3dadd(-66.84, 200.58, -61.58, 1.8)
	pt3dadd(-68.16, 204.86, -61.58, 1.8)
	pt3dadd(-68.69, 206.22, -62.57, 1.8)
	pt3dadd(-69.22, 208.69, -62.57, 1.8)
	pt3dadd(-70.81, 213.2, -62.57, 1.8)
	pt3dadd(-73.18, 215.93, -62.57, 1.8)
	pt3dadd(-74.51, 219.08, -61.17, 1.8)
	pt3dadd(-76.36, 224.26, -62.02, 1.8)
	pt3dadd(-78.21, 227.19, -63.49, 1.8)
	pt3dadd(-79.8, 231.47, -63, 1.8)
	pt3dadd(-81.59, 235.68, -63, 1.8)
	pt3dadd(-82.12, 237.26, -61.22, 1.8)
	pt3dadd(-84.5, 241.54, -61.22, 1.8)
	pt3dadd(-85.3, 244.47, -61.22, 1.8)
	pt3dadd(-86.09, 248.75, -61.22, 1.8)
	pt3dadd(-87.15, 251.45, -61.22, 1.8)
	pt3dadd(-91.59, 255.65, -61.22, 1.8)
	pt3dadd(-93.44, 259.48, -61.9, 1.8)
	pt3dadd(-95.3, 261.51, -61.9, 1.8)
	pt3dadd(-97.94, 266.47, -61.9, 1.8)
	pt3dadd(-101.12, 271.87, -61.51, 1.8)
	pt3dadd(-104.38, 277.16, -65.16, 1.8)
	pt3dadd(-108.09, 285.94, -62.74, 1.8)
	pt3dadd(-111.8, 295.63, -65.09, 1.8)
	pt3dadd(-116.13, 302.11, -66.62, 1.8)
	pt3dadd(-116.92, 307.97, -64.75, 1.8)
	pt3dadd(-117.19, 311.57, -66.13, 1.8)
	pt3dadd(-117.72, 316.98, -66, 1.8)
	pt3dadd(-117.86, 317, -64.54, 1.8)
  }
  dend[6] {pt3dclear()
	pt3dadd(2.86, 50.16, -19.86, 2.25)
	pt3dadd(9.12, 54.27, -25.21, 2.25)
	pt3dadd(11.24, 55.85, -25.61, 2.25)
  }
  dend[7] {pt3dclear()
	pt3dadd(11.24, 55.85, -25.61, 2.25)
	pt3dadd(15.48, 57.65, -27.78, 1.8)
	pt3dadd(19.98, 61.03, -29.87, 1.8)
	pt3dadd(23.95, 65.08, -32.36, 1.8)
	pt3dadd(25.28, 67.11, -34.42, 1.8)
	pt3dadd(25.16, 68.34, -36.15, 1.8)
	pt3dadd(28.86, 71.49, -37.85, 1.8)
	pt3dadd(31.25, 74.65, -38.83, 1.8)
	pt3dadd(34.43, 78.25, -41.43, 1.8)
	pt3dadd(37.07, 82.31, -43.52, 1.8)
	pt3dadd(40.52, 85.91, -44.67, 1.8)
	pt3dadd(45.39, 90.49, -46.3, 1.8)
	pt3dadd(51.48, 96.58, -48.62, 1.8)
	pt3dadd(55.72, 101.76, -50.66, 1.8)
	pt3dadd(59.16, 105.81, -54.06, 1.8)
	pt3dadd(60.02, 109.87, -55.69, 1.8)
	pt3dadd(62.66, 114.82, -57.74, 1.8)
	pt3dadd(66.9, 122.26, -62.81, 1.8)
	pt3dadd(69.02, 126.54, -63.11, 1.8)
	pt3dadd(68.43, 128.39, -66.06, 1.8)
	pt3dadd(72.14, 136.05, -68.33, 1.8)
	pt3dadd(74.52, 141.46, -69.93, 1.8)
	pt3dadd(77.17, 146.64, -71.02, 1.8)
	pt3dadd(79.61, 154.47, -73.96, 1.8)
	pt3dadd(81.46, 158.98, -74.79, 1.8)
	pt3dadd(82.52, 161.91, -76.24, 1.8)
	pt3dadd(83.05, 163.26, -76.36, 1.8)
  }
  dend[8] {pt3dclear()
	pt3dadd(83.05, 163.26, -76.36, 1.8)
	pt3dadd(86.75, 168.44, -76.36, 1.8)
	pt3dadd(90.2, 176.25, -79.26, 1.8)
	pt3dadd(94.17, 182.78, -80.41, 1.8)
	pt3dadd(97.88, 189.09, -80.1, 1.8)
	pt3dadd(101.79, 195.25, -84.82, 1.8)
	pt3dadd(104.44, 202.45, -84.82, 1.8)
	pt3dadd(105.77, 206.96, -84.82, 1.8)
	pt3dadd(105.24, 213.72, -85.91, 1.8)
	pt3dadd(104.08, 217.99, -83.41, 1.8)
	pt3dadd(108.85, 224.3, -83.41, 1.8)
	pt3dadd(114.94, 229.93, -81.58, 1.8)
	pt3dadd(118.65, 235.56, -81.58, 1.8)
	pt3dadd(122.06, 244.62, -79.24, 1.8)
	pt3dadd(124.71, 250.71, -79.24, 1.8)
	pt3dadd(127.89, 255.44, -79.24, 1.8)
	pt3dadd(130.14, 259.44, -79.24, 1.8)
	pt3dadd(131.73, 261.27, -79.78, 1.8)
  }
  dend[9] {pt3dclear()
	pt3dadd(131.73, 261.27, -79.78, 1.8)
	pt3dadd(134.91, 263.97, -78.7, 1.8)
	pt3dadd(136.5, 267.58, -78.7, 1.35)
	pt3dadd(138.88, 271.63, -79.74, 1.35)
	pt3dadd(142.32, 278.39, -76.79, 1.35)
	pt3dadd(145.66, 282.87, -76.79, 1.35)
	pt3dadd(147.78, 286.25, -76.79, 1.35)
	pt3dadd(149.64, 288.28, -76.79, 1.35)
	pt3dadd(150.43, 288.95, -80.71, 1.35)
  }
  dend[10] {pt3dclear()
	pt3dadd(131.73, 261.27, -79.78, 1.8)
	pt3dadd(135.93, 269.02, -79.78, 1.8)
	pt3dadd(138.58, 273.53, -79.78, 1.8)
	pt3dadd(140.43, 276.68, -79.78, 1.8)
	pt3dadd(143.08, 281.86, -79.78, 1.8)
	pt3dadd(145.41, 287.85, -79.78, 1.8)
	pt3dadd(148.05, 292.58, -80.29, 1.8)
	pt3dadd(151.76, 297.98, -80.35, 1.8)
	pt3dadd(156.26, 305.42, -81.08, 1.8)
	pt3dadd(161.78, 312.6, -78.66, 1.8)
	pt3dadd(163.64, 317.1, -78.66, 1.8)
	pt3dadd(163.11, 324.31, -78.66, 1.8)
	pt3dadd(161.96, 326.89, -77.94, 1.8)
	pt3dadd(159.32, 331.85, -77.69, 1.8)
	pt3dadd(158.52, 339.28, -77.69, 1.8)
	pt3dadd(159.32, 343.11, -77.69, 1.8)
	pt3dadd(161.81, 351.52, -77.29, 1.8)
  }
  dend[11] {pt3dclear()
	pt3dadd(83.05, 163.26, -76.36, 1.8)
	pt3dadd(84.68, 171, -78.65, 1.8)
	pt3dadd(87.06, 179.78, -80.87, 1.8)
	pt3dadd(88.65, 188.8, -82.65, 1.8)
	pt3dadd(89.34, 197.6, -84.76, 1.8)
	pt3dadd(91.99, 207.29, -84.76, 1.8)
	pt3dadd(94.41, 216.85, -84.76, 1.8)
	pt3dadd(97.85, 226.54, -84.76, 1.8)
  }
}
proc shape3d_2() {
  dend[11] {	pt3dadd(99.94, 231.77, -86.72, 1.8)
	pt3dadd(101.79, 239.43, -87.02, 1.8)
	pt3dadd(103.38, 247.76, -89.37, 1.8)
	pt3dadd(103.95, 252.27, -90.46, 1.8)
	pt3dadd(107.66, 263.76, -90.46, 1.8)
	pt3dadd(109.25, 271.22, -90.24, 1.8)
	pt3dadd(110.28, 275.44, -91.02, 1.8)
	pt3dadd(111.61, 279.72, -93, 1.8)
	pt3dadd(113.19, 283.55, -93, 1.8)
	pt3dadd(114.25, 286.48, -94.22, 1.8)
	pt3dadd(115.84, 294.14, -93.74, 1.8)
	pt3dadd(118.41, 304.78, -92.94, 1.8)
	pt3dadd(121.85, 315.59, -93.88, 1.8)
	pt3dadd(125.79, 325.73, -93.88, 1.8)
	pt3dadd(129.77, 336.34, -93.88, 1.8)
	pt3dadd(130.62, 344.95, -91.07, 1.8)
	pt3dadd(131.94, 351.71, -92.05, 1.8)
	pt3dadd(131.68, 356.44, -91.37, 1.8)
	pt3dadd(130.03, 358.87, -92.84, 1.8)
  }
  dend[12] {pt3dclear()
	pt3dadd(11.24, 55.85, -25.61, 2.25)
	pt3dadd(12.02, 60.7, -28.74, 2.25)
	pt3dadd(13.08, 64.53, -32.5, 2.25)
	pt3dadd(13.34, 67.68, -35.26, 2.25)
	pt3dadd(14.66, 72.18, -37.71, 2.25)
	pt3dadd(15.72, 74.66, -40.48, 2.25)
	pt3dadd(16.09, 79.32, -43.74, 1.8)
	pt3dadd(16.88, 84.28, -48.91, 1.8)
	pt3dadd(18.21, 89.91, -51.92, 1.8)
	pt3dadd(17.94, 95.31, -54.73, 1.8)
	pt3dadd(19.28, 102.4, -59.05, 1.8)
	pt3dadd(19.81, 106.68, -61.65, 1.8)
	pt3dadd(21.4, 111.41, -65.21, 1.8)
	pt3dadd(21.4, 116.14, -67.21, 1.8)
	pt3dadd(22.15, 121.37, -67.31, 1.8)
	pt3dadd(22.68, 124.97, -70.37, 1.8)
	pt3dadd(23.21, 128.8, -70.37, 1.8)
	pt3dadd(23.21, 131.51, -73.53, 1.8)
  }
  dend[13] {pt3dclear()
	pt3dadd(23.21, 131.51, -73.53, 1.8)
	pt3dadd(24.54, 136.69, -75.99, 1.8)
	pt3dadd(23.22, 137.49, -79.97, 1.8)
	pt3dadd(23.22, 142.22, -77.93, 1.8)
	pt3dadd(23.22, 146.5, -80.76, 1.8)
	pt3dadd(22.69, 150.56, -83.18, 1.8)
	pt3dadd(21.63, 154.38, -84.51, 1.8)
	pt3dadd(19.77, 159.12, -87.41, 1.8)
	pt3dadd(18.96, 160.26, -88.14, 1.8)
	pt3dadd(17.11, 169.05, -90.78, 1.8)
	pt3dadd(15.79, 177.61, -93.03, 1.8)
	pt3dadd(15.42, 186.27, -95.49, 1.8)
	pt3dadd(14.36, 195.06, -98.7, 1.8)
	pt3dadd(13.57, 203.17, -100.8, 1.8)
	pt3dadd(12.03, 210.85, -103.03, 1.8)
	pt3dadd(10.45, 214.23, -104.34, 1.8)
	pt3dadd(12.3, 224.81, -109.12, 1.8)
	pt3dadd(12.69, 236.28, -112.04, 1.8)
	pt3dadd(11.36, 243.71, -115.34, 1.8)
	pt3dadd(10.03, 253.73, -115.52, 1.8)
	pt3dadd(8.45, 263.86, -118.03, 1.8)
	pt3dadd(7.83, 271, -120.82, 1.8)
	pt3dadd(7.56, 279.56, -123.21, 1.8)
	pt3dadd(7.03, 289.92, -125.62, 1.8)
	pt3dadd(7.08, 294.94, -129.86, 1.8)
	pt3dadd(8.4, 301.03, -132.67, 1.8)
	pt3dadd(8.14, 308.91, -135.22, 1.8)
	pt3dadd(7.63, 313.89, -138.18, 1.8)
	pt3dadd(8.16, 321.1, -141.6, 1.8)
	pt3dadd(8.69, 329.66, -144.53, 1.8)
	pt3dadd(8.56, 339.68, -146.76, 1.8)
	pt3dadd(8.82, 342.6, -146.76, 1.8)
	pt3dadd(10.41, 348.91, -146.18, 1.8)
  }
  dend[14] {pt3dclear()
	pt3dadd(23.21, 131.51, -73.53, 1.8)
	pt3dadd(22.43, 135.6, -71.46, 1.8)
	pt3dadd(21.9, 142.13, -71.46, 1.8)
	pt3dadd(23.22, 150.69, -70.81, 1.8)
	pt3dadd(23.22, 162.03, -68.38, 1.8)
	pt3dadd(22.69, 169.24, -68.38, 1.8)
	pt3dadd(17.33, 179.08, -68.38, 1.8)
	pt3dadd(13.62, 188.99, -68.38, 1.8)
	pt3dadd(10.71, 196.15, -70.82, 1.8)
	pt3dadd(9.39, 202.45, -73.04, 1.8)
	pt3dadd(9.12, 210.56, -73.72, 1.8)
	pt3dadd(7.37, 216.2, -71.26, 1.8)
	pt3dadd(8.16, 230.16, -71.26, 1.8)
	pt3dadd(7.36, 244.36, -71.26, 1.8)
	pt3dadd(6.83, 253.14, -71.26, 1.8)
	pt3dadd(3.58, 263.1, -71.26, 1.8)
	pt3dadd(0.4, 272.34, -71.26, 1.8)
	pt3dadd(-0.31, 282.08, -72.12, 1.8)
	pt3dadd(-1.1, 287.71, -72.34, 1.8)
	pt3dadd(-0.84, 293.34, -70.1, 1.8)
	pt3dadd(-1.37, 303.53, -72, 1.8)
	pt3dadd(-1.37, 309.16, -72, 1.8)
	pt3dadd(1.81, 317.04, -72, 1.8)
	pt3dadd(5, 325.3, -71.17, 1.8)
	pt3dadd(5.53, 330.7, -71.17, 1.8)
	pt3dadd(3.94, 335.66, -71.17, 1.8)
	pt3dadd(-0.74, 343.92, -71.1, 1.8)
  }
  dend[15] {pt3dclear()
	pt3dadd(-1.55, 32.78, -4.78, 2.7)
	pt3dadd(1.07, 44, -8.67, 1.8)
	pt3dadd(4.25, 53.47, -10.3, 1.8)
	pt3dadd(4.49, 58.74, -11.07, 1.8)
	pt3dadd(5.28, 62.8, -13.37, 1.8)
	pt3dadd(5.55, 65.73, -13.37, 1.8)
  }
  dend[16] {pt3dclear()
	pt3dadd(5.55, 65.73, -13.37, 1.8)
	pt3dadd(7.66, 72.26, -15.04, 1.8)
	pt3dadd(9.48, 80.75, -16.36, 1.8)
	pt3dadd(11.59, 87.73, -17.74, 1.8)
	pt3dadd(13.98, 93.81, -19.65, 1.8)
	pt3dadd(17.93, 99.65, -19.65, 1.8)
	pt3dadd(23.49, 106.18, -22.27, 1.8)
	pt3dadd(28.52, 113.39, -22.27, 1.8)
	pt3dadd(31.27, 119.72, -23.72, 1.8)
	pt3dadd(33.39, 128.28, -25.66, 1.8)
	pt3dadd(35.24, 135.94, -26.94, 1.8)
	pt3dadd(37.08, 144.3, -29.5, 1.8)
	pt3dadd(39.72, 154.21, -31.81, 1.8)
	pt3dadd(41.61, 163.22, -35.72, 1.8)
	pt3dadd(43.46, 173.36, -37.75, 1.8)
	pt3dadd(43.95, 178.12, -39.59, 1.8)
	pt3dadd(46.07, 182.85, -39.59, 1.8)
	pt3dadd(47.13, 185.33, -39.59, 1.8)
  }
  dend[17] {pt3dclear()
	pt3dadd(47.13, 185.33, -39.59, 1.8)
	pt3dadd(50.84, 188.48, -40.08, 1.8)
	pt3dadd(53.48, 192.99, -38.67, 1.8)
	pt3dadd(57.39, 197.07, -40.17, 1.8)
	pt3dadd(61.9, 204.95, -39.38, 1.8)
	pt3dadd(64.74, 209.01, -41.17, 1.8)
	pt3dadd(68.45, 214.41, -37.63, 1.8)
	pt3dadd(72.66, 220.95, -37.63, 1.8)
	pt3dadd(75.57, 225, -37.63, 1.8)
	pt3dadd(80.07, 229.51, -36.14, 1.8)
	pt3dadd(84.05, 234.46, -36.9, 1.8)
	pt3dadd(89.05, 240.27, -35.88, 1.8)
	pt3dadd(95.94, 247.03, -33.42, 1.8)
	pt3dadd(99.65, 251.08, -33.42, 1.8)
	pt3dadd(105.21, 256.49, -32.04, 1.8)
	pt3dadd(109.72, 268.98, -30.71, 1.8)
	pt3dadd(112.64, 271.68, -27.56, 1.8)
	pt3dadd(116.34, 272.36, -27.56, 1.8)
	pt3dadd(120.58, 272.58, -26.78, 1.8)
	pt3dadd(123.76, 273.93, -26.78, 1.8)
	pt3dadd(127.99, 278.21, -27.25, 1.8)
	pt3dadd(131.4, 285.15, -28.34, 1.8)
	pt3dadd(137.75, 293.71, -28.92, 1.8)
	pt3dadd(140.93, 297.76, -29.27, 1.8)
	pt3dadd(145.52, 305.42, -29.58, 1.8)
	pt3dadd(150.55, 313.08, -28.57, 1.8)
	pt3dadd(154.79, 317.36, -24.61, 1.8)
	pt3dadd(156.68, 319.19, -21.76, 1.8)
  }
  dend[18] {pt3dclear()
	pt3dadd(47.13, 185.33, -39.59, 1.8)
	pt3dadd(49.81, 193.42, -42.72, 1.8)
	pt3dadd(51.13, 198.61, -45.61, 1.8)
	pt3dadd(51.92, 204.24, -47.79, 1.8)
	pt3dadd(52.82, 206.67, -47.79, 1.8)
	pt3dadd(57.32, 213.88, -45.34, 1.8)
	pt3dadd(60.5, 221.98, -45.34, 1.8)
	pt3dadd(63.14, 229.87, -45.34, 1.8)
	pt3dadd(65.15, 238.42, -47.2, 1.8)
	pt3dadd(67, 244.05, -47.2, 1.8)
	pt3dadd(67.26, 246.76, -47.26, 1.8)
	pt3dadd(67.53, 247.66, -47.26, 1.8)
  }
  dend[19] {pt3dclear()
	pt3dadd(67.53, 247.66, -47.26, 1.8)
	pt3dadd(69.65, 249.91, -49.2, 1.8)
	pt3dadd(73.35, 255.54, -51.18, 1.8)
	pt3dadd(76.86, 262.1, -51.38, 1.8)
	pt3dadd(80.57, 271.11, -55.21, 1.8)
	pt3dadd(82.43, 277.64, -55.21, 1.8)
	pt3dadd(85.86, 288.63, -57.7, 1.8)
	pt3dadd(87.98, 297.19, -59.52, 1.8)
	pt3dadd(89.08, 310.25, -61.09, 1.8)
	pt3dadd(90.41, 318.36, -63.4, 1.8)
	pt3dadd(92.81, 329.83, -62.61, 1.8)
	pt3dadd(93.86, 333.66, -62.61, 1.8)
	pt3dadd(99.95, 339.96, -62.61, 1.8)
	pt3dadd(105.05, 343.77, -61.57, 1.8)
	pt3dadd(111.67, 348.27, -60.24, 1.8)
  }
  dend[20] {pt3dclear()
	pt3dadd(67.53, 247.66, -47.26, 1.8)
	pt3dadd(67.36, 259.95, -49.22, 1.8)
	pt3dadd(66.83, 268.96, -49.22, 1.8)
	pt3dadd(66.09, 273.49, -49.22, 1.8)
	pt3dadd(66.88, 279.35, -51, 1.8)
	pt3dadd(66.88, 281.6, -51, 1.8)
	pt3dadd(64.76, 287.68, -51, 1.8)
	pt3dadd(62.91, 294.44, -52.65, 1.8)
	pt3dadd(60.9, 304.98, -50.88, 1.8)
	pt3dadd(59.05, 314.21, -50.88, 1.8)
	pt3dadd(58.43, 320.3, -52.27, 1.8)
	pt3dadd(61.08, 329.98, -52.97, 1.8)
	pt3dadd(64.25, 337.19, -53.7, 1.8)
	pt3dadd(68.72, 345.95, -56.92, 1.8)
	pt3dadd(70.84, 350.45, -54.73, 1.8)
	pt3dadd(73.49, 353.83, -54.67, 1.8)
  }
  dend[21] {pt3dclear()
	pt3dadd(5.55, 65.73, -13.37, 1.8)
	pt3dadd(3.7, 73.62, -13.37, 1.8)
	pt3dadd(1.59, 83.09, -10.18, 1.8)
	pt3dadd(-0.03, 90.62, -10.18, 1.8)
	pt3dadd(-0.3, 102.34, -10.18, 1.8)
	pt3dadd(0.35, 113.18, -10.18, 1.8)
	pt3dadd(-0.18, 123.99, -10.43, 1.8)
	pt3dadd(0.09, 135.48, -10.43, 1.8)
  }
}
proc shape3d_3() {
  dend[21] {	pt3dadd(0.35, 144.94, -10.43, 1.8)
	pt3dadd(2.74, 156.23, -10.43, 1.8)
	pt3dadd(4.06, 163.69, -10.43, 1.8)
	pt3dadd(2.96, 170.8, -10.33, 1.8)
	pt3dadd(3.49, 173.05, -10.33, 1.8)
	pt3dadd(3.23, 184.54, -10.37, 1.8)
	pt3dadd(2.69, 195.18, -7.78, 1.8)
	pt3dadd(2.96, 203.51, -7.78, 1.8)
	pt3dadd(2.76, 211.47, -7.37, 1.8)
	pt3dadd(5.41, 218.46, -7.37, 1.8)
	pt3dadd(10.44, 230.4, -7.37, 1.8)
	pt3dadd(14.13, 241.15, -2.97, 1.8)
	pt3dadd(19.43, 250.61, -1.58, 1.8)
	pt3dadd(20.95, 254.87, -1.58, 1.8)
	pt3dadd(24.65, 260.5, -1.58, 1.8)
	pt3dadd(28.1, 267.93, -1.1, 1.8)
	pt3dadd(30.48, 274.24, 0.63, 1.8)
	pt3dadd(33.07, 279.85, 1.35, 1.8)
	pt3dadd(37.57, 291.33, 1.35, 1.8)
	pt3dadd(39.43, 295.39, 1.35, 1.8)
	pt3dadd(45.78, 310.03, 4.44, 1.8)
	pt3dadd(49.48, 316.79, 6.9, 1.8)
	pt3dadd(51.74, 323.55, 6.18, 1.8)
	pt3dadd(54.39, 333.46, 6.2, 1.8)
	pt3dadd(57.04, 340.67, 6.2, 1.8)
	pt3dadd(59.94, 347.5, 6.2, 1.8)
	pt3dadd(61.79, 351.78, 4.07, 1.8)
	pt3dadd(65.5, 356.28, 1.16, 1.8)
	pt3dadd(67.35, 360.56, -0.08, 1.8)
  }
  dend[22] {pt3dclear()
	pt3dadd(-2.08, 24.45, -2.86, 2.7)
	pt3dadd(-4.81, 27.08, -3.11, 1.8)
	pt3dadd(-5.61, 29.33, -2.83, 1.8)
  }
  dend[23] {pt3dclear()
	pt3dadd(-5.61, 29.33, -2.83, 1.8)
	pt3dadd(-9.05, 30.68, 0.97, 1.8)
	pt3dadd(-14.08, 38.57, 0.97, 1.8)
	pt3dadd(-19.11, 44.87, 3.12, 1.8)
	pt3dadd(-21.99, 49.6, 4.79, 1.8)
	pt3dadd(-23.85, 55.24, 4.34, 1.8)
	pt3dadd(-24.91, 59.29, 6.18, 1.8)
	pt3dadd(-26.5, 61.99, 7.46, 1.8)
	pt3dadd(-28.08, 63.57, 5.83, 1.8)
	pt3dadd(-33.11, 66.58, 8.59, 1.8)
	pt3dadd(-41.32, 75.81, 11.74, 2.25)
	pt3dadd(-42.91, 78.74, 14.48, 2.25)
	pt3dadd(-47.94, 83.7, 14.48, 2.25)
	pt3dadd(-52.99, 89.08, 14.92, 2.25)
	pt3dadd(-58.29, 98.77, 12.2, 1.8)
	pt3dadd(-60.67, 103.52, 10.62, 1.8)
	pt3dadd(-64.65, 111.11, 12.92, 1.8)
  }
  dend[24] {pt3dclear()
	pt3dadd(-64.65, 111.11, 12.92, 1.8)
	pt3dadd(-69.42, 119.89, 12.92, 1.8)
	pt3dadd(-72.6, 126.65, 12.92, 1.8)
	pt3dadd(-74.56, 131.58, 12.92, 1.8)
	pt3dadd(-78.54, 144.2, 12.92, 1.8)
	pt3dadd(-80.14, 148.98, 12.92, 1.8)
	pt3dadd(-81.46, 155.06, 11.2, 1.8)
	pt3dadd(-84.9, 163.4, 11.2, 1.8)
	pt3dadd(-90.71, 174.04, 9.83, 1.8)
	pt3dadd(-94.15, 181.04, 9.83, 1.8)
	pt3dadd(-97.59, 188.48, 7.38, 1.8)
	pt3dadd(-101.19, 193.63, 7.21, 1.8)
	pt3dadd(-102.51, 199.04, 7.21, 1.8)
	pt3dadd(-106.48, 205.34, 6.16, 1.8)
	pt3dadd(-110.72, 212.33, 7.25, 1.8)
	pt3dadd(-114.94, 217.43, 7.25, 1.8)
	pt3dadd(-118.91, 221.71, 7.25, 1.8)
	pt3dadd(-122.62, 228.92, 6.54, 1.8)
	pt3dadd(-125.53, 234.55, 4.11, 1.8)
	pt3dadd(-128.99, 243.91, 5.08, 1.8)
	pt3dadd(-130.05, 252.92, 5.08, 1.8)
	pt3dadd(-135.18, 260.08, 2.5, 1.8)
	pt3dadd(-139.41, 267.29, 0.24, 1.8)
	pt3dadd(-139.94, 273.37, -0.4, 1.8)
	pt3dadd(-144.45, 280.23, -0.51, 1.8)
	pt3dadd(-148.68, 286.54, -2.38, 1.8)
	pt3dadd(-151.07, 293.97, -3.66, 1.8)
	pt3dadd(-156.18, 302.86, -6.57, 1.8)
	pt3dadd(-159.35, 312.77, -8.94, 1.8)
	pt3dadd(-161.93, 318.05, -9.78, 1.8)
	pt3dadd(-166.96, 326.16, -12.94, 1.8)
	pt3dadd(-170.14, 333.15, -16, 1.8)
	pt3dadd(-173.85, 337.8, -18.41, 1.8)
	pt3dadd(-174.38, 345.01, -22.63, 1.8)
	pt3dadd(-174.38, 346.14, -23.73, 1.8)
  }
  dend[25] {pt3dclear()
	pt3dadd(-64.65, 111.11, 12.92, 1.8)
	pt3dadd(-65.81, 115.51, 18, 1.8)
	pt3dadd(-67.13, 117.98, 18, 1.8)
	pt3dadd(-67.66, 119.11, 18, 1.8)
  }
  dend[26] {pt3dclear()
	pt3dadd(-67.66, 119.11, 18, 1.8)
	pt3dadd(-71.37, 123.62, 20.43, 1.8)
	pt3dadd(-74.54, 129.47, 24.31, 1.8)
	pt3dadd(-78.61, 136.25, 24.31, 1.8)
	pt3dadd(-79.93, 140.99, 24.31, 1.8)
	pt3dadd(-80.19, 144.36, 24.31, 1.8)
	pt3dadd(-80.72, 147.97, 26.17, 1.8)
	pt3dadd(-83.37, 155.18, 26.9, 1.8)
	pt3dadd(-86.99, 162.71, 26.9, 1.8)
	pt3dadd(-88.84, 168.56, 31.08, 1.8)
	pt3dadd(-90.43, 175.55, 31.08, 1.8)
	pt3dadd(-93.92, 178.4, 31.08, 1.8)
	pt3dadd(-98.16, 188.31, 33.86, 1.8)
	pt3dadd(-100.54, 194.62, 33.86, 1.8)
	pt3dadd(-101.34, 202.78, 36.94, 1.8)
	pt3dadd(-104.52, 211.57, 40.82, 1.8)
	pt3dadd(-108.23, 219.45, 46.9, 1.8)
	pt3dadd(-112.52, 223.7, 46.9, 1.8)
	pt3dadd(-116.23, 233.62, 51.22, 1.8)
	pt3dadd(-118.61, 241.72, 51.22, 1.8)
	pt3dadd(-122.98, 253.34, 52.98, 1.8)
	pt3dadd(-128.01, 260.55, 52.98, 1.8)
	pt3dadd(-136.23, 268.08, 52.98, 1.8)
	pt3dadd(-142.85, 272.81, 52.98, 1.8)
	pt3dadd(-150.79, 277.54, 52.98, 1.8)
	pt3dadd(-159.15, 283.53, 57.15, 1.8)
	pt3dadd(-164.72, 289.16, 59.46, 1.8)
	pt3dadd(-171.07, 297.27, 58.44, 1.8)
	pt3dadd(-177.44, 305.16, 60.86, 1.8)
	pt3dadd(-180.08, 308.76, 60.86, 1.8)
	pt3dadd(-185.91, 311.92, 60.86, 1.8)
	pt3dadd(-192, 317.55, 58.05, 1.8)
	pt3dadd(-198.17, 325.78, 56.14, 1.8)
	pt3dadd(-201.08, 330.29, 55.3, 1.8)
	pt3dadd(-203.47, 335.47, 56.23, 1.8)
	pt3dadd(-206.38, 342.23, 53.17, 1.8)
	pt3dadd(-207.67, 349.21, 48.94, 1.8)
  }
  dend[27] {pt3dclear()
	pt3dadd(-67.66, 119.11, 18, 1.8)
	pt3dadd(-66.09, 126.61, 20.55, 1.8)
	pt3dadd(-65.03, 134.49, 20.55, 1.8)
	pt3dadd(-63.7, 140.12, 20.55, 1.8)
	pt3dadd(-63.89, 148.93, 20.55, 1.8)
	pt3dadd(-63.62, 162.22, 19.14, 1.8)
	pt3dadd(-65.07, 171.71, 18.07, 1.8)
	pt3dadd(-66.13, 182.52, 19.53, 1.8)
	pt3dadd(-66.94, 191.01, 21.26, 1.8)
	pt3dadd(-66.68, 197.09, 21.26, 1.8)
	pt3dadd(-68.53, 205.43, 26.09, 1.8)
	pt3dadd(-71.66, 210.43, 28.74, 1.8)
	pt3dadd(-71.92, 216.06, 28.74, 1.8)
	pt3dadd(-73.78, 222.14, 31.42, 1.8)
	pt3dadd(-75.9, 228.45, 33.08, 1.8)
	pt3dadd(-78.73, 232.73, 33.08, 1.8)
	pt3dadd(-80.05, 243.09, 34.09, 1.8)
	pt3dadd(-80.85, 251.65, 35.6, 1.8)
	pt3dadd(-83.86, 264.94, 38.22, 1.8)
	pt3dadd(-84.92, 275.75, 40.29, 1.8)
	pt3dadd(-90.18, 291.87, 39.34, 1.8)
	pt3dadd(-92.3, 305.83, 39.34, 1.8)
	pt3dadd(-95.66, 317.59, 39.34, 1.8)
	pt3dadd(-98.04, 330.43, 39.34, 1.8)
	pt3dadd(-99.61, 339.21, 39.34, 1.8)
	pt3dadd(-99.34, 350.7, 37.37, 1.8)
	pt3dadd(-101.2, 361.46, 37.06, 1.8)
	pt3dadd(-101.2, 367.77, 36.13, 1.8)
  }
  dend[28] {pt3dclear()
	pt3dadd(-5.61, 29.33, -2.83, 1.8)
	pt3dadd(-4.74, 32.08, -0.81, 1.8)
	pt3dadd(-4.74, 39.51, -2.2, 1.8)
	pt3dadd(-3.15, 45.59, -2.2, 1.8)
	pt3dadd(-1.83, 50.32, -2.2, 1.8)
	pt3dadd(-2.41, 60.36, -2.2, 1.8)
	pt3dadd(-1.62, 73.2, -2.2, 1.8)
	pt3dadd(-2.01, 78, -2.2, 1.8)
	pt3dadd(-2.81, 82.51, -2.2, 1.8)
	pt3dadd(-2.54, 85.21, -2.2, 1.8)
  }
  dend[29] {pt3dclear()
	pt3dadd(-2.54, 85.21, -2.2, 1.8)
	pt3dadd(-1.48, 90.62, -2.2, 1.8)
	pt3dadd(-0.95, 98.28, -2.2, 1.8)
	pt3dadd(-0.88, 105.01, -2.2, 1.8)
	pt3dadd(0.97, 113.57, -3.65, 1.8)
	pt3dadd(3.09, 123.03, -4.74, 1.8)
	pt3dadd(4.51, 131.16, -6.59, 1.8)
	pt3dadd(6.63, 137.47, -6.59, 1.8)
	pt3dadd(8.74, 146.48, -8.11, 1.8)
	pt3dadd(8.52, 155.23, -8.11, 1.8)
	pt3dadd(9.31, 164.7, -8.11, 1.8)
	pt3dadd(11.9, 175.04, -8.11, 1.8)
	pt3dadd(13.75, 181.57, -8.11, 1.8)
	pt3dadd(15.34, 188.33, -8.11, 1.8)
	pt3dadd(15.85, 191.63, -8.11, 1.8)
	pt3dadd(17.44, 194.56, -8.11, 1.8)
  }
  dend[30] {pt3dclear()
	pt3dadd(17.44, 194.56, -8.11, 1.8)
	pt3dadd(22.47, 198.39, -7.78, 1.8)
	pt3dadd(27.23, 202.44, -7.78, 1.8)
	pt3dadd(30.15, 206.5, -7.18, 1.8)
	pt3dadd(34.82, 211.2, -5.5, 1.8)
	pt3dadd(40.91, 217.06, -5.35, 1.8)
	pt3dadd(47, 224.04, -5.35, 1.8)
	pt3dadd(51.77, 230.83, -6.38, 1.8)
	pt3dadd(57.01, 240.51, -2.53, 1.8)
	pt3dadd(63.1, 248.39, -2.53, 1.8)
	pt3dadd(68.4, 254.93, 0.99, 1.8)
	pt3dadd(71.76, 260.96, 3.47, 1.8)
	pt3dadd(78.91, 268.16, 4.57, 1.8)
	pt3dadd(83.41, 272.9, 4.57, 1.8)
	pt3dadd(89.41, 278.05, 6.13, 1.8)
	pt3dadd(95.5, 289.54, 6.13, 1.8)
	pt3dadd(100.26, 299.46, 10.03, 1.8)
	pt3dadd(103.5, 308.66, 11.35, 1.8)
	pt3dadd(108, 316.54, 12.7, 1.8)
	pt3dadd(113.29, 325.78, 12.7, 1.8)
	pt3dadd(115.7, 330.15, 15.47, 1.8)
  }
}
proc shape3d_4() {
  dend[30] {	pt3dadd(123.38, 334.66, 16.55, 1.8)
  }
  dend[31] {pt3dclear()
	pt3dadd(17.44, 194.56, -8.11, 1.8)
	pt3dadd(18.11, 202.03, -8.11, 1.8)
	pt3dadd(19.7, 209.92, -10.2, 1.8)
	pt3dadd(22.08, 218.93, -10.2, 1.8)
	pt3dadd(23.18, 224.91, -10.2, 1.8)
	pt3dadd(23.97, 233.04, -12.56, 1.8)
	pt3dadd(26.62, 237.55, -12.56, 1.8)
	pt3dadd(26.72, 247.16, -12.56, 1.8)
	pt3dadd(28.84, 259.32, -9.98, 1.8)
	pt3dadd(31.57, 269.61, -9.98, 1.8)
	pt3dadd(33.95, 284.93, -9.98, 1.8)
	pt3dadd(36.04, 301.32, -11.38, 1.8)
	pt3dadd(38.42, 311, -13.58, 1.8)
	pt3dadd(38.19, 322.51, -13.62, 1.8)
	pt3dadd(39.78, 331.75, -16.19, 1.8)
	pt3dadd(41.24, 339.53, -15.2, 1.8)
	pt3dadd(47.07, 348.77, -17.56, 1.8)
	pt3dadd(48.13, 352.15, -16.24, 1.8)
  }
  dend[32] {pt3dclear()
	pt3dadd(-2.54, 85.21, -2.2, 1.8)
	pt3dadd(-4.6, 92.38, -2.2, 1.8)
	pt3dadd(-4.86, 101.42, -2.2, 1.8)
	pt3dadd(-5.13, 108.63, -2.2, 1.8)
	pt3dadd(-8.06, 116.53, -2.2, 1.8)
	pt3dadd(-9.38, 123.29, -2.2, 1.8)
	pt3dadd(-10.18, 132.98, -2.86, 1.8)
	pt3dadd(-10.88, 145.21, -1.64, 1.8)
	pt3dadd(-11.41, 156.93, -1.64, 1.8)
	pt3dadd(-12.54, 167.46, -0.05, 1.8)
	pt3dadd(-12.81, 177.6, -0.85, 1.8)
	pt3dadd(-13.41, 181.05, -2.07, 1.8)
  }
  dend[33] {pt3dclear()
	pt3dadd(-13.41, 181.05, -2.07, 1.8)
	pt3dadd(-13.15, 186.68, 3.42, 1.8)
	pt3dadd(-12.88, 196.6, 3.42, 1.8)
	pt3dadd(-14.21, 201.85, 3.42, 1.8)
	pt3dadd(-14.47, 209.99, 6.96, 1.8)
	pt3dadd(-15, 214.5, 6.96, 1.8)
	pt3dadd(-15.35, 222.16, 6.96, 1.8)
	pt3dadd(-15.08, 231.84, 6.29, 1.8)
	pt3dadd(-15.35, 241.98, 6.41, 1.8)
	pt3dadd(-15.55, 255.99, 9.83, 1.8)
	pt3dadd(-14.49, 264.78, 13.54, 1.8)
	pt3dadd(-15.81, 270.05, 13.54, 1.8)
	pt3dadd(-14.22, 279.52, 14.72, 1.8)
	pt3dadd(-13.69, 286.27, 17.48, 1.8)
	pt3dadd(-11.3, 296.84, 17.91, 1.8)
	pt3dadd(-10.5, 313.31, 18.58, 1.8)
	pt3dadd(-11.54, 324.31, 23.02, 1.8)
	pt3dadd(-10.75, 335.12, 25.84, 1.8)
	pt3dadd(-13.33, 344.11, 22.61, 1.8)
	pt3dadd(-15.18, 347.94, 21.16, 1.8)
	pt3dadd(-19.15, 350.87, 21.66, 1.8)
  }
  dend[34] {pt3dclear()
	pt3dadd(-13.41, 181.05, -2.07, 1.8)
	pt3dadd(-15.06, 190.46, -2.07, 1.8)
	pt3dadd(-17.18, 199.92, -2.07, 1.8)
	pt3dadd(-18.14, 210.66, -0.7, 1.8)
	pt3dadd(-18.67, 221.47, -4.14, 1.8)
	pt3dadd(-19.01, 230.43, -6.1, 1.8)
	pt3dadd(-20.6, 237.87, -8.03, 1.8)
	pt3dadd(-21.39, 248, -8.5, 1.8)
	pt3dadd(-22.87, 256.41, -10.02, 1.8)
	pt3dadd(-24.99, 270.15, -10.02, 1.8)
	pt3dadd(-28.12, 284.64, -13.29, 1.8)
	pt3dadd(-30.24, 295.23, -15.32, 1.8)
	pt3dadd(-32.8, 309.89, -17.63, 1.8)
	pt3dadd(-35.71, 325.69, -21.22, 1.8)
	pt3dadd(-37.34, 333.31, -23.7, 1.8)
	pt3dadd(-36.81, 345.7, -24.34, 1.8)
	pt3dadd(-35.62, 350.88, -24.86, 1.8)
	pt3dadd(-34.03, 355.16, -26.42, 1.8)
  }
}
proc basic_shape() {
  shape3d_1()
  shape3d_2()
  shape3d_3()
  shape3d_4()
}

proc connect_pre() {  // $o1 target point process, $o2 returned NetCon
	soma $o2 = new NetCon (&v(1), $o1)
	//alternative statement		$o1.soma pre_list.append(new NetCon(soma.v(1),syn,0,Delsyn,0))
	}

	objref syn
	objref DistalSynapses 
	objref DistalSynapsePositions 
	proc synapse() {
	
  
 // //***** PP syn   
 
DistalSynapses = new Vector(0,0) 
DistalSynapses .append(4, 5, 8, 9,10,11,13,14,17,18,19,20,21,24,26,27,30,31,33,34) 
DistalSynapsePositions = new Vector(0,0) 
DistalSynapsePositions .append(0.70196,0.70414,0.59425,    0.5,    0.5,0.55292,0.65498,  0.666,0.59682,0.76037,    0.5,    0.5,0.76657,0.67837,0.64648,0.66454,0.59747,0.60824,0.64002,0.64056) 
for i= 0 , 19 { 
dend[DistalSynapses .x[i]] syn = new Exp2Syn(DistalSynapsePositions .x[i]) // PP syn based on Greg and Staley 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0  
pre_list.append(syn) // 
} 
 
 // //***** MC syn   
 
dend[0] syn = new Exp2Syn(0.5) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 20 
dend[1] syn = new Exp2Syn(0.5) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 21 
dend[2] syn = new Exp2Syn(0.5) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 22 
dend[3] syn = new Exp2Syn(0.060717) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 23 
dend[6] syn = new Exp2Syn(0.43883) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 24 
dend[15] syn = new Exp2Syn(0.48952) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 25 
dend[22] syn = new Exp2Syn(0.5) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 26 
dend[23] syn = new Exp2Syn(0.16947) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 27 
dend[28] syn = new Exp2Syn(0.3231) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 28 
 
 // //***** HIPP   
 
dend[4] syn = new Exp2Syn(0.70196) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 29 
dend[5] syn = new Exp2Syn(0.70414) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 30 
dend[8] syn = new Exp2Syn(0.59425) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 31 
dend[9] syn = new Exp2Syn(0.5) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 32 
dend[10] syn = new Exp2Syn(0.5) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 33 
dend[11] syn = new Exp2Syn(0.55292) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 34 
dend[13] syn = new Exp2Syn(0.65498) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 35 
dend[14] syn = new Exp2Syn(0.666) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 36 
dend[17] syn = new Exp2Syn(0.59682) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 37 
dend[18] syn = new Exp2Syn(0.76037) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 38 
dend[19] syn = new Exp2Syn(0.5) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 39 
dend[20] syn = new Exp2Syn(0.5) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 40 
dend[21] syn = new Exp2Syn(0.76657) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 41 
dend[24] syn = new Exp2Syn(0.67837) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 42 
dend[26] syn = new Exp2Syn(0.64648) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 43 
dend[27] syn = new Exp2Syn(0.66454) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 44 
dend[30] syn = new Exp2Syn(0.59747) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 45 
dend[31] syn = new Exp2Syn(0.60824) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 46 
dend[33] syn = new Exp2Syn(0.64002) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 47 
dend[34] syn = new Exp2Syn(0.64056) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 48 
 
 // //***** BC syn   
 
soma syn = new Exp2Syn(0.5) // BC  syn syn based on Bartos 
syn.tau1 = 0.26	syn.tau2 = 5.5	syn.e = -70 
pre_list.append(syn) // # 49 
 
 // //***** Sprout   
 
dend[0] syn = new Exp2Syn(0.5) //Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 50 
dend[1] syn = new Exp2Syn(0.5) //Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 51 
dend[2] syn = new Exp2Syn(0.5) //Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 52 
dend[3] syn = new Exp2Syn(0.060717) // Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 53 
dend[6] syn = new Exp2Syn(0.43883) // Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 54 
dend[15] syn = new Exp2Syn(0.48952) // Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 55 
dend[22] syn = new Exp2Syn(0.5) //Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 56 
dend[23] syn = new Exp2Syn(0.16947) // Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 57 
dend[28] syn = new Exp2Syn(0.3231) // Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 58 

}
	func is_art() { return 0 }

	endtemplate GranuleCell52
//************************************************************************************************************