The average branch length is 30 microns and I want to place two beads per branch.
Imagine BN beads placed evenly along the length of a neurite. If the beads are centered at relative positions (0.5 + i)/BN, where i = 0..BN-1, they will be evenly positioned along a chain of such neurites.
These statements will create a chain of AXN sections called ax[0]..ax[AXN-1]. Each bead will be approximated by a conic bifrustum, i.e. a pair of conic frusta whose bases are joined and whose apices point in opposite directions, something like this <>
Code: Select all
AXN = 5 // or however many you want
create ax[AXN]
for i=1,AXN-1 connect ax[i](0), ax[i-1](1)
ND = 0.2 // neurite diameter
NL = 30 // and length
BD = 0.5 // bead diameter
BL = 0.5 // and length
// assumes 2 beads/axon section
forsec "ax" {
pt3dclear()
pt3dadd(0, 0,0, ND)
pt3dadd(NL*0.5/2 - BL/2, 0,0, ND) // start of bead 1
pt3dadd(NL*0.5/2, 0,0, BD)
pt3dadd(NL*0.5/2 + BL/2, 0,0, ND) // end of bead 1
pt3dadd(NL*1.5/2 - BL/2, 0,0, ND) // start of bead 2
pt3dadd(NL*1.5/2, 0,0, BD)
pt3dadd(NL*1.5/2 + BL/2, 0,0, ND) // end of bead 2
pt3dadd(NL, 0,0, ND
}
// next: assign desired value of nseg
The ax sections will be rendered in shape plots as if they lie end to end, like so:
Code: Select all
ax[0] ax[1] ax[2]
o-----o-----o----- etc.
If you want them to be arranged like a staircase
Code: Select all
etc.
|
o-----o ax[2]
|
| ax[1]
o-----o ax[0]
(which may be more convenient if you intend to use GUI tools like the Point Process Manager), then do this:
Code: Select all
proc staircase() { local right
right = 1
forsec "ax" {
if (right == 1) { // draw this one from left to right
pt3dclear()
pt3dadd(0, 0,0, ND)
pt3dadd(NL*0.5/2 - BL/2, 0,0, ND) // start of bead 1
pt3dadd(NL*0.5/2, 0,0, BD)
pt3dadd(NL*0.5/2 + BL/2, 0,0, ND) // end of bead 1
pt3dadd(NL*1.5/2 - BL/2, 0,0, ND) // start of bead 2
pt3dadd(NL*1.5/2, 0,0, BD)
pt3dadd(NL*1.5/2 + BL/2, 0,0, ND) // end of bead 2
pt3dadd(NL, 0,0, ND
right == 0
} else { // draw this one from bottom to top
pt3dclear()
pt3dadd(0, 0,0, ND)
pt3dadd(0, NL*0.5/2 - BL/2, 0, ND) // start of bead 1
pt3dadd(0, NL*0.5/2, 0, BD)
pt3dadd(0, NL*0.5/2 + BL/2, 0, ND) // end of bead 1
pt3dadd(0, NL*1.5/2 - BL/2, 0, ND) // start of bead 2
pt3dadd(0, NL*1.5/2, 0, BD)
pt3dadd(0, NL*1.5/2 + BL/2, 0, ND) // end of bead 2
pt3dadd(0, NL, 0, ND
right == 1
}
}
}
This will accomplish the geometry specification and it will look "correct" in shape plots, but it may not be what you really want, especially if you intend to assign different electrical properties to the membrane or cytoplasm of the beads. Why? Because the surface area of each bead will simply be added to the surface area of the segment that contains it. Likewise, the effect of bead diameter on axial resistance will be to slightly reduce the axial resistance in the segment that contains it. If you try to assign special properties to the bead itself, or to its cytoplasm, these will be assigned to the entire segment that contains the bead. nseg would have to be at least 30/0.5 = 60 to allow you to reliably assign properties to the beads that differ from the intervening lengths of axon.
So you may actually be better off reverting to stylized specification of geometry, using separate sections for each bead and each piece of "ordinary axon."
Code: Select all
ND = 0.2 // neurite diameter
NL = 30 // and length
NN = 5 // number of neurites
BD = 0.5 // bead diameter
BL = 0.5 // and length
BN = 2 // number of beads/neurite
N = NN*BN
create ax[N+1], bead[N]
for i=0,N-1 {
connect bead[i](0), ax[i](1)
connect ax[i+1](0), bead[i](1)
}
forsec "ax" {
diam = 0.2
L = (NL/BN) - BL
}
forsec "bead" {
diam = 0.5
L = BL
}