SEARCH
TOOLBOX
LANGUAGES
RandomDistributionInSurface

RandomDistributionInSurface

From SOFAWiki

Jump to: navigation, search

This engine creates a set of randomly distributed points in a closed surface.

Contents

Input Data's

  • triangles
list of triangles of the closed surface
  • points
list of positions of the previous triangles
  • surfaceVertices
list of positions

Output Data's

  • inPoints
list of generated points, which are inside the closed surface.

Important Parameter

  • numberOfInPoints
desired number of generated points
  • minDistanceBetweenPoints
minimum distance between 2 points (put -1 for true randomness)
  • numberOfTests
testing if a point is in a closed surface consists in seeing if the point and a random direction intersects the surface. Obviously, if the direction is not very convenient, the result will be not correct. So we can put a certain number of tests to be valid.
  • randomSeed
if you want the same pattern each time you run the test, fix the seed to have always the same results.

Examples

See multi-engines example.