Good questions.
For the root section (the section that has no parent), the first pt3dadd() statement pertains to its 0 end, and subsequent statements are treated as if they trace out a path that steps inexorably toward its 1 end (coordinates of which are specified by that section's last pt3dadd() statement). The same is true for each child section whose 0 end is connected to its parent.
The usual practice for user-written code is to specify each section's pt3d data using relative coordinates, that is, as if the 0 end of the section were at 0,0,0.
After specifying the topology (branched architecture) of the model cell, and the geometry of each section (each section's pt3d coordinates and diameters), be sure to call
define_shape()
so that
"sections that already have pt3d info are translated to ensure that their first point is at the same location as the parent."
http://www.neuron.yale.edu/neuron/stati ... fine_shape
This is also relevant when changing the position of the soma. Is it enough to specify the position of the soma and state the connections so that the neuron moves its position relative to the soma position?
If a Shape Plot already exists, all that is necessary is to translate each of the soma's pt3d data. If a Shape Plot does not already exist, a second step is required: either create a Shape Plot, or call define_shape().
If you examine the hoc code for a cell class exported from the CellBuilder, note the following:
1. declaration of these public members: x, y, z, position
2. in the template's proc init(), this assignment statement and comment
x = y = z = 0 // only change via position
3. this procedure which can be used to specify the location of the root node of an instance of the cell class:
Code: Select all
proc position() { local i
soma for i = 0, n3d()-1 {
pt3dchange(i, $1-x+x3d(i), $2-y+y3d(i), $3-z+z3d(i), diam3d(i))
}
x = $1 y = $2 z = $3
}
It will be useful to review
http://www.neuron.yale.edu/neuron/stati ... f-geometry and the functions and procedures described there.