random_points_on_polyline
random_points_on_polyline(V, n, EC=None)
Generate points on the edges of a polyline.
Use a uniform distribution to randomly distribute random points in a given polyline.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
V |
numpy double array
|
Matrix of polyline vertices |
required |
n |
int
|
Number of desired points |
required |
EC |
numpy int array, optional (default None)
|
Matrix of polyline indeces into V. If None, the polyline is assumed to be open and ordered. |
None
|
Returns:
Name | Type | Description |
---|---|---|
P |
numpy double array
|
Matrix of randomly sampled points that lay on the polyline |
N |
numpy double array
|
Matrix of outward facing polyline normals at P |
See Also
edge_indices.
Examples:
TODO
Source code in src/gpytoolbox/random_points_on_polyline.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|