-------------------------------------------
variable: $bokflag -- curv-based mod sample depth
-------------------------------------------
default: 0

"NormSamp, Clust Controls" parameter.  To adjust,
access pop-up by L-click on "label:" (bold).

This flag affects the operation of both of the
following functions:

  write_label_timecourses_stats
  ("label:" line "T" and "S" buttons)

  paint_surface
  ("val3d:" line "PAINT" button)

If not ticked, sample distances (either mm or
fractional) are used as entered.

If ticked, the sample distance along the vertex
normal, dist, is replaced by dist2, using the
following equations.  The variables $sulfrac and
$gyrfrac control the strength of a Bok-like
cortical layer position correction, which falls
to zero at the gray/white matter and pial
surface:

 sulmm = sulfrac*thickness;
 gyrmm = gyrfrac*thickness;
 if (curv>0.0)
   dist2 += curv/curvmax*sulmm* -cos(Pi*dist/thick+0.5*Pi);
 else
   dist2 += curv/curvmin*gyrmm* -cos(Pi*dist/thick+0.5*Pi);

This only works if $normdfracflag is set to 1
(i.e., use fractional thickness distances):
