Distributes N random points in accordance with the density matrix M. Only points within the sharp boundaries of a 2d contour c are selected (see below). Note that the number of resulting points is therefore typically smaller than N. The boundary can be further reduced by a distance thr, minimal distance that a point needs to be away from any point on the contour. This makes particularly sense if the contour was obtained using “hull_tree” in 2D. A contour c is defined by:

c = [contour1 x1 x2 x3 ...  contour2 x1 x2 x3 ...;
  #number_of_pairs y1 y2 y3 ...  #number_of_pairs y1 y2 y3 ...]'

“hull_tree” can for example produce such a contour and this can be used to describe the spanning field of a neuronal tree in the construction process.

Example:
As an example, let‘s get some points which are similarly distributed as an underlying hsn cell:

>> tree = hsn_tree;

>> [M dX dY dZ] = gdens_tree (tree, 20, ...
  find (B_tree (tree) | T_tree (tree)), '-s');

>> c = hull_tree (tree, 20, [], [], [], '-2d');

>>[X Y Z] = rpoints_tree (M, 1290, [], dX, dY, dZ, 5);

TREES

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License