Page 1 of 1

surface area of a whole morphology

Posted: Mon Sep 11, 2006 11:54 am
by mikey
I wonder if there is any tool that can sum up the surface area of a full morphology? As to do it manually would take an age. Thanks so much.

Posted: Mon Sep 11, 2006 12:12 pm
by hines

Code: Select all

a=0
forall for (x) a += area(x)
print a

Posted: Mon Sep 11, 2006 12:19 pm
by hines
I forgot to mention that the previous code fragment assumed only one cell (e.g, no acell_home_). Slightly more elaborate for a network model is the following function which returns the area of the cell containing the currently accessed section

Code: Select all

func cellarea() { local a, x   localobj cell
    cell = new SectionList()
    cell.wholetree()
    a = 0
    forsec cell for (x,0) { a += area(x) }
    return a
}