compute a smoothed direction that ignores staircasing
Description
This is very similar to direction with the only difference that it takes the average over 2*n+1 directions
Syntax
dir = calcMeanDirection(gB)
dir = calcMeanDirection(gB,2)Input
| gB | grainBoundary | 
| n | number of neighboring vertices considered | 
Output
| dir | vector3d |