Table of Contents

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 ware artificially created and fits the tree therefore very well.

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.