Coherent Length
Definition
The CoherentLength
quadratic constraint ensures that a segment length, defined as the distance between two point variables, ps and pe, is equal to a scalar variable l, representing the length of the segment. In other words, the constraint updates the scalar variable and the two points variables so that the distance between the points equals the length.
Requirements
To use the CoherentLength
constraint the following variables must be defined in the solver:
- ps : Point variable corresponding to the start of the segment.
- pe : Point variable corresponding to the end of the segment.
- l : Scalar variable representing the length of the segment.
Suggestions
When vertices and segment lengths are both added as variables in the solver, the CoherentLength
constraint must be added to the solver. Otherwise, any energy or constraint using the length variables will produce unreliable results.
Constraint Formulation
The formulation of the CoherentLength
constraint reads :
Hence, in the case where the points are from a three-dimensional space, the local problem can be expressed as follow:
In the framework, the CoherentLength
constraint is not restricted to the three-dimensional case. The dimension of the space is given at initialisation of the constraint.