I'm having some trouble understanding how area(x) is calculated in the morphology of my model. My basic understanding is that when a morphology is imported into NEURON, it is specified using the pt3dadd function, which specifies the segments as truncated cones/frusta. Furthermore, despite having many pt3dadd data points, this seems to get reduced when using the d_lambda rule to compartmentalize the model (e.g. 49 pt3dadd data points in one section of my model became reduced to 11 compartments). My first question, is how diameters are computed (i.e. based on the diameters declared by the pt3dadd function) for these "merged" compartments? When calculating the average diameter for the pt3dadd data points that merged into one compartment, I see that it does not exactly equate to the diameter that is now listed in that segment.
Secondly, since the segments in my model are presumably truncated cones, I expected that the equation of the lateral surface area of a truncated cone should equate to the surface area computed by area(x). However I noticed that for a single segment, this value is larger than when using area(x). Of course, this discrepancy (obviously) becomes amplified when computing this for an entire dendritic tree (e.g. in one dendritic tree the value computed using the equation for the lateral surface area of a truncated cone was almost 60um^2 larger than when using area(x)). On the other hand, if using the equation for the lateral surface area of a cylinder the difference becomes smaller (e.g. in the same dendritic tree, the value computed using the equation for the lateral surface area of a cylinder was only 5um^2 smaller than when using area(x)). I have also read that area(x) calculates the integral of the surface area, which, apparently, does not necessarily equate to the normal equations of surface area(?). With this in mind, I have a couple more questions:
Does area(x) in fact calculate the integral of the surface area, and, if so, why is this measure more suitable to use than the normal surface area equation?
Does area(x) distinguish between when it should be calculating a segment as a truncated cone or a cylinder? If not, and it assumes that all segments are cylinders, this may explain why the lateral surface area of a cylinder provided a closer answer to what was computed by area(x).
Several ways of calculating surface area in the segments:
oc>access dend[3]
oc>nseg
11
oc>div = 1/nseg // Find the proportion of the first segment along dend[3]
oc>div
0.090909091
oc>PI*((sqrt(((L*div)^2)+((diam(0)/2)(diam(div)/2))^2))*((diam(0)/2)+(diam(div)/2))) // Lateral surface area of a truncated cone
86.692146
oc>PI*diam(div)*L*div // Lateral surface area of a cylinder
85.888932
oc>area(div) // Integral of the surface area(?)
85.893665
Any help is much appreciated,
Alex GM
Questions about geometry & area(x)

 Site Admin
 Posts: 5889
 Joined: Wed May 18, 2005 4:50 pm
 Location: Yale University School of Medicine
 Contact:
Re: Questions about geometry & area(x)
Good questions. Let me bring your attention to the discussion of 3D specification of geometry in the Programmers' Reference
https://www.neuron.yale.edu/neuron/stat ... fgeometry
especially this part:
Conceptual Overview of Sections
https://www.neuron.yale.edu/neuron/stat ... fsections
You might find it helpful to construct a couple of simple test cases that have known answers (i.e. which you figure out for yourself) and then see if NEURON's area(), diam, and L return the values that you expect.
https://www.neuron.yale.edu/neuron/stat ... fgeometry
especially this part:
For more information about stylized and pt3d specification of geometry, please see the material in the Programmers' Reference that starts withThe shape model used for a section when the pt3d list is nonempty is that of a sequence of truncated cones in which the pt3d points define the location and diameter of the ends. From this sequence of points, the effective area, diameter, and resistance is computed for each segment via a trapezoidal integration across the segment length. This takes into account the extra area due to sqrt(dx^2 + dy^2) for fast changing diameters (even degenerate cones of 0 length can be specified, ie. two points with same coordinates but different diameters) but no attempt is made to deal with centroid curvature effects on the area.
Conceptual Overview of Sections
https://www.neuron.yale.edu/neuron/stat ... fsections
You might find it helpful to construct a couple of simple test cases that have known answers (i.e. which you figure out for yourself) and then see if NEURON's area(), diam, and L return the values that you expect.
Re: Questions about geometry & area(x)
Ted, please provide a formula for calculating the effective area of a segment via a trapezoidal integration across the segment length.From this sequence of points, the effective area, diameter, and resistance is computed for each segment via a trapezoidal integration across the segment length.

 Site Admin
 Posts: 5889
 Joined: Wed May 18, 2005 4:50 pm
 Location: Yale University School of Medicine
 Contact:
Re: Questions about geometry & area(x)
Trapezoidal integration has nothing to do with it. If a section's geometry is specified using the stylized method (specification of L and diam), each segment is treated as if it is cylindrical and its surface area is calculated from its diameter. If geometry is specified with the 3d (AKA pt3d) method, a section is treated as a chain of frusta, and each segment's area is calculated from the areas of the frusta that it spans (linear interpolation of diameter is applied as needed if a segment boundary does not align with a pt3d data point). For an illustrated explanation, see the relevant part of the NEURON Book or go to https://neuron.yale.edu/neuron/docs/keypapers and get the version of "The NEURON Simulation Environment" that we published in Neural Computation several years ago. To learn what the "stylized" and "3d" methods are, search the Programmer's Reference for these terms.