-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathspine.hoc
33 lines (31 loc) · 1 KB
/
spine.hoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/********************************************************************
Create a spine with a spine neck
connected to the parant dendrite dendA5_00
*************************************************/
{create spine_neck}
{dendA5_00 connect spine_neck(0),0.8}
{access spine_neck}
necklength = 1 /*spine neck length in um*/
neckdiam = 0.0394 /*spine neck diameter*/
spine_neck {nseg = 2
pt3dclear()
for j = 0, nseg-1 {
ty = (j*necklength)/(nseg-1)
pt3dadd(97.58,ty,20.87,neckdiam)
}
}
{create spine_head}
{spine_neck connect spine_head(0), 1}
{access spine_head}
spineradius = 0.297
spine_head {nseg = 7
pt3dclear()
for i = 0, nseg-1 {
ty = -(i*2*spineradius)/(nseg-1)
td = 2*sqrt(spineradius^2-(ty+spineradius)^2)
if (td<neckdiam){
td = neckdiam
}
pt3dadd(97.58,ty+1,20.87,td)
}
}