Segment Parallelity
Definition
The SegmentParallelity
energy ensures that a segment, defined from two point variables ps and pe, is parallel to a fixed direction, defined from a unit vector vdir.
Requirements
To use the SegmentParallelity
energy 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.
The target direction vdir is not add as a variable of the Guided Projection Algorithm. It is specified at initialisation of the constraint.
Suggestions
To use this constraint, a length variable must be used. The definition of length variables should always be coupled with the CoherentLength
constraint to ensure that the length variable accurately represents the distance between the two points defining the segment, ps and pe in the current context.
Energy Formulation
The formulation of the SegmentParallelity
energy reads :
which, in the case where the points are from a three-dimensional space, develops to :
Hence, the local problem can be expressed as follow:
In the framework, the SegmentParallelity
energy is not restricted to the three-dimensional case. The dimension of the space is given at initialisation of the constraint thanks to the target direction vector vdir.