It appears there are two ways one could use this function, possibly a consequence of maintaining backwards compatability.
Style 1: Reference point at root of branch
Use
Code: Select all
distance()
Code: Select all
distance(x)
Style 2: Reference point specified by user
Use
Code: Select all
distance(0,x1)
Code: Select all
distance(1,x2)
A little test script to demonstrate this is:
Code: Select all
create dend
dend {
L = 100
diam = 1
nseg = 10 // usually, it's a good idea to use an odd value of nseg, but an even value is used here for illustrative purposes
// SECTION 1
distance() // sets origin to root of currently accessed section
for i= 0,4 {
p = 0.25*i
print distance(p)
}
print ""
// SECTION 2
distance(0,0.5) // sets origin to arbitrary point of currently accessed section
for i= 0,4 {
p = 0.25*i
print distance(1,p)
}
}
It might be beneficial to users to have this documentation updated and clarified. Thanks.
Brad