version 0.6.0
Loading...
Searching...
No Matches
type_shape::abs_shape_get_samples_inside Interface Reference

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)
 

Detailed Description

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
      !!      ┏━━━━━━━┓       ×━━━×━━━×       ×━×━×━×━×
      !!      ┃       ┃       ┃       ┃       × × × × ×
      !!      ┃   ×   ┃       ×   ×   ×       × × × × ×    ...
      !!      ┃       ┃       ┃       ┃       × × × × ×
      !!      ┗━━━━━━━┛       ×━━━×━━━×       ×━×━×━×━×
      !! 
Parameters
[in,out]shapeany shape
[in]i,j,kcoordinates of the cell
[in]nvalue to put where the sample is inside the shape
[in]n_samplessampling level (see description)
[in,out]samplesarray of the (2*n_sammples+1)^d samples

The documentation for this interface was generated from the following file: