User Tools

Site Tools


tutorials:using-point-cloud-to-validate-model

This is an old revision of the document!


Using a point cloud to validate a simulation

Idea

The idea is to use a point cloud of a measured tree and “move it over” the simulate tree to see how similar the tree and the measurements are. In the following the point cloud (shown in the figure below) were artificially created and fits the tree therefore very well.

Generated example point cloud and two models with 99% and 85% accuracy

The example model can be found in the GroIMP gallery

Steps

  1. Import the point cloud as a graph into the growth model. (see here)
  2. Grow the model to the right size (e.g. the age of the measured plant)
  3. Building the mathematical volume of the simulated plant
  4. Querying the points of the point cloud to estimate the coverage of the model

Generating a volume

A volumes in GroIMP can be handled using most operators known from set theory, therefore it is also possible to create a union out two volumes by using the logical or operator |. This can be used to create one volume out of all elements from the simulation with a simple query:

Volume v = volume(first((*F*)));
[
 f:F ::> {v = v | volume(f);}
]

Counting the points

A volume in GroIMP comes with contains function, that checks if a point is included in the volume. This can be used in a XL query to count all point included in the volume created above:

long inside = count((*p:Point,(v.contains(p,false)==true)*));
long total = count((*Point*));
println((float)inside/(float)total);

Therefore the output from the last line above creates the relative portion of points inside of the simulated structure.

This approach can easily be extended to be used with bounding boxes or more abstract shapes.

tutorials/using-point-cloud-to-validate-model.1730713060.txt.gz · Last modified: 2024/11/04 10:37 by tim