## area() function -- stylized method -- 3d-method

Managing anatomically complex model cells with the CellBuilder. Importing morphometric data with NEURON's Import3D tool or Robert Cannon's CVAPP. Where to find detailed morphometric data.
ngreiner
Posts: 11
Joined: Tue Feb 28, 2017 8:12 am

### area() function -- stylized method -- 3d-method

Hello,

I am encountering a behaviour of the area() function which I don't understand, materialised by the code-example below.

The mentioned behaviour is that when I define the geometry of a section using the 3d-method, the formula `sec(0.5).area()` and `sec.L * sec.diam * h.PI` yield different results.
By contrast, when I define the section geometry using the stylized method, both formula above yield the same result.

Here is the code-example:

Code: Select all

``````from neuron import h

sec1 = h.Section()
print 'sec1 L: ', sec1.L
print 'sec1 diam: ', sec1.diam
print 'sec1 cust. area: ', sec1.L * sec1.diam * h.PI
print 'sec1 neuron area: ', sec1(0.5).area()
print ''

sec2 = h.Section()
sec2.L = 7.0
sec2.diam = 35.0
print 'sec2 L: ', sec2.L
print 'sec2 diam: ', sec2.diam
print 'sec2 cust. area: ', sec2.L * sec2.diam * h.PI
print 'sec2 neuron area: ', sec2(0.5).area()``````
which prints the following lines on the terminal
sec1 L: 7.0
sec1 diam: 35.0
sec1 cust. area: 769.690200129
sec1 neuron area: 2854.61711509

sec2 L: 7.0
sec2 diam: 35.0
sec2 cust. area: 769.690200129
sec2 neuron area: 769.690200129
Can anyone explain to me why this is so ?

Which one of the 2 formulae does NEURON use to compute the transmembrane currents ?

Thank you very much in advance for the help,

Nathan

hines
Posts: 1575
Joined: Wed May 18, 2005 3:32 pm

### Re: area() function -- stylized method -- 3d-method

When there are 3-d points the area of a segment is the sum of all frusta between adjacent 3-d points that intersect the segment. No curvature
effects are taken into account but effects of the sqrt(dradius^2 + darc^2) are taken into account
(notice that if there are two points at the same position
with different diameters, the area contribution is non-zero even though the length between the two points is 0)

ramcdougal
Posts: 153
Joined: Fri Nov 28, 2008 3:38 pm
Location: Yale School of Medicine

### Re: area() function -- stylized method -- 3d-method

There is some discussion about how segment areas and volumes are calculated at:

https://www.neuron.yale.edu/neuron/stat ... f-geometry

To say what hines said another way: in your first case, you're defining a tapered shape while the second case defines a cylinder.
For the tapered formula, see

http://mathworld.wolfram.com/ConicalFrustum.html

The other thing to keep in mind is that diam only gives you information about the diameter at one point within a segment (the midpoint) but the area and volume depend on potentially many changes in diameter, and you can only determine that by checking the 3d points.

(Thanks to hines for clarifying some of my confusion on this matter.)

ted
Posts: 5566
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

### Re: area() function -- stylized method -- 3d-method

Which one of the 2 formulae does NEURON use to compute the transmembrane currents ?
NEURON uses the correct surface area, which is the value that area() returns.

ngreiner
Posts: 11
Joined: Tue Feb 28, 2017 8:12 am