Check if a given number of point lies in a shape. More...
Public Member Functions | |
subroutine | abs_shape_get_samples_inside (shape, i, j, k, n, n_samples, samples) |
Sample a cell of coordinates (i
,j
,k
) with (2*n_samples+1)^d samples, where d denotes the dimension of the cell. Return a integer array samples
containing the value n
where the sample is inside the shape.
n_samples
is called the sampling level and can take its value in range [0,∞].
Example of sampling for various sampling level:
!! n_samples = 0 n_samples = 1 n_samples = 2 !! ┏━━━━━━━┓ ×━━━×━━━× ×━×━×━×━× !! ┃ ┃ ┃ ┃ × × × × × !! ┃ × ┃ × × × × × × × × ... !! ┃ ┃ ┃ ┃ × × × × × !! ┗━━━━━━━┛ ×━━━×━━━× ×━×━×━×━× !!
[in,out] | shape | any shape |
[in] | i,j,k | coordinates of the cell |
[in] | n | value to put where the sample is inside the shape |
[in] | n_samples | sampling level (see description) |
[in,out] | samples | array of the (2*n_sammples+1)^d samples |