measure allowing to compute length of contact between shapes
This measure allows to compute the portion of contour of a shape which is in contact with its neighbors.
Length of contact for a shape composed of a collection of segments is computed as followed :
We parse all segments from shape and for each we check whether segment fulfil contact policy requirement with another shape. If this is the case we considers that whole segment length is in contact with other shapes.
Given the fact that input data are discreet, notion of contact is defined with respect to a distance threshold ContactDist parameter. Length of contact will be accounted for distances lower or equal to this user parameter.
On following figures, we represents :
Contact policy parameter ContactPolicy takes the following values :
At last, measure parameter SegmentSubSamplingStep allows if set to requiere sub sampling of shape segments.
This parameter allows to make computation much more precise with the drawback of greater computation cost.
An additional parameter flag ProcessHoles allows to specify whether shape holes should be taken into account during computation. Please see Distance to nearest neighbor 2d for an explanation of effects of this flag.
Note that this measure is not symmetric since length of contact of a first particle to a second one may not be the same as the length of contact of second particle to the first one. This fact is illustrated by following figure where length of contact of left shape is paint in green while length of contact of right shape is paint in orange :
In next figures, shapes (ie. the polygonal approximation of their boundary), are colored with respect to the length of associated contact.
Here is an example of the effect of contact distance threshold parameter ContactDist on computation results (please take care of scale bar values), in this case :
Here is an example of the effect of contact policy parameter ContactPolicy on computation results (please take care of scale bar values), in this case :
Here is an example of the effect of contact policy parameter ContactPolicy on computation results (please take care of scale bar values), in this case :
measure allowing to compute length of contact between shapes
Measure Type | Measure Unit Type | Parameter Type | Result Type | Shape Requirements |
---|---|---|---|---|
![]()
Geometry 2d | ![]()
Length | ![]() | ![]()
Value (ipsdk::ipReal64) | ![]()
Boundary Approximation |