Generalize constraints to observables #47

Open
opened 2025-02-10 21:02:25 +00:00 by Vectornaut · 1 comment
Collaborator

Idea

All of the constraints we've considered so far can be expressed by fixing a real-valued parameter of the assembly. Some constraints come directly in this form:

  • Constraining the angle between two spheres to be 45°
  • Constraining the distance between two points to be 3 units

Other constraints can be rephrased in this form:

  • Constraining two spheres to be externally tangent is equivalent to constraining the angle between them to be 180°
  • Constraining a point to lie on a sphere is equivalent to constraining the Lorentz product between the point and the sphere to be zero

It might therefore be convenient to unify the interface elements for measuring and constraining real-valued observables.

Benefits

Observables would reduce clutter by presenting the same information and controls with fewer interface elements. When an observable is constrained, measuring its actual value is the same as reading off its desired value (as long as the constraints are satisfied), so there's little need for an observable to me measured and constrained separately.

Observables would also reduce the need for inactive constraints, because switching an observable from constraint mode to measurement mode is roughly equivalent to deactivating it. However, an inactive constraint does carry information: the desired value of the observable. Not every implementation of observables would preserve this information in measurement mode.

## Idea All of the constraints we've considered so far can be expressed by fixing a real-valued parameter of the assembly. Some constraints come directly in this form: - Constraining the angle between two spheres to be 45° - Constraining the distance between two points to be 3 units Other constraints can be rephrased in this form: - Constraining two spheres to be externally tangent is equivalent to constraining the angle between them to be 180° - Constraining a point to lie on a sphere is equivalent to constraining the Lorentz product between the point and the sphere to be zero It might therefore be convenient to unify the interface elements for measuring and constraining real-valued observables. ## Benefits Observables would reduce clutter by presenting the same information and controls with fewer interface elements. When an observable is constrained, measuring its actual value is the same as reading off its desired value (as long as the constraints are satisfied), so there's little need for an observable to me measured and constrained separately. Observables would also reduce the need for inactive constraints, because switching an observable from constraint mode to measurement mode is roughly equivalent to deactivating it. However, an inactive constraint does carry information: the desired value of the observable. Not every implementation of observables would preserve this information in measurement mode.
Vectornaut added the
enhancement
label 2025-02-10 21:02:25 +00:00
Owner

A good thought exercise here is to contemplate constraints we might be interested in imposing that do not mesh well with the "fixing a scalar observable". Here are some we definitely want to be able to do where it may not be crystal clear what measurement we are constraining:

  • Two planes parallel, at any distance (may be covered by angle between the planes)
  • Distance between two planes (which has as a corollary that the planes must be parallel, so how do we measure this distance for a general pair of planes? Is the measurement always 0 if the planes intersect?)
  • Two lines parallel
  • Distance between two lines (some similarities with distance between two planes, but here the lines do not have to be parallel to have a nonzero distance, but again, do we show a distance of 0 whenever two lines intersect?)
  • Equality constraints
  • Congruence constraints
  • Midpoint/center constraints (B is the midpoint of AC seems like a conjunction of a collinearity constraint and a congruence constrain; P is the center of sphere s seems a bit different, although I guess it can be realized by two auxiliary points with two incidence constraints to put them on the sphere and then a congruence constraint of the line segments of P to each.)
  • Symmetry constraints ('point A must be the reflection of point B through plane p', 'point C is the inversion of point B in sphere s')
  • Translation constraint ('point A plus vector v is point B' -- I guess that's also a symmetry constraint, really)
  • Inequality constraints ('point A lies within sphere s', 'point A lies in the positive half-space of plane p (assuming that our planes are oriented, which I think they are)')
  • Local inequality constraints ('the neighborhood of hyperbola h about point P on h lies to the left of P')
  • More general equational constraints ('the distance from P to A plus the distance from P to B is 7' to constrain P to an ellipsoid)
  • Similarity constraint ('tetrahedron T is similar to tetrahedron U')

Some other constraints that seem as though they would fit in this paradigm:

  • Incidence constraints (some distance(s) should be 0, possibly involving an auxiliary point created for the modeler)
  • Collinearity constraints (some angle should be π or some area be 0)
  • Coplanarity constraint (some volume should be 0)

Should we go through these, all of which it's likely or at least conceivable we will eventually want to be able to support, and see if they can all be captured by this paradigm in some not-too-contrived way? If so, what might we do if there are some which really feel difficult to be shoehorned into the "constraint-is-a-frozen-observable" paradigm?

A good thought exercise here is to contemplate constraints we might be interested in imposing that do _not_ mesh well with the "fixing a scalar observable". Here are some we definitely want to be able to do where it may not be crystal clear what measurement we are constraining: * Two planes parallel, at any distance (may be covered by angle between the planes) * Distance between two planes (which has as a corollary that the planes must be parallel, so how do we measure this distance for a general pair of planes? Is the measurement always 0 if the planes intersect?) * Two lines parallel * Distance between two lines (some similarities with distance between two planes, but here the lines do not have to be parallel to have a nonzero distance, but again, do we show a distance of 0 whenever two lines intersect?) * Equality constraints * Congruence constraints * Midpoint/center constraints (B is the midpoint of AC seems like a conjunction of a collinearity constraint and a congruence constrain; P is the center of sphere s seems a bit different, although I guess it can be realized by two auxiliary points with two incidence constraints to put them on the sphere and then a congruence constraint of the line segments of P to each.) * Symmetry constraints ('point A must be the reflection of point B through plane p', 'point C is the inversion of point B in sphere s') * Translation constraint ('point A plus vector v is point B' -- I guess that's also a symmetry constraint, really) * Inequality constraints ('point A lies within sphere s', 'point A lies in the positive half-space of plane p (assuming that our planes are oriented, which I think they are)') * Local inequality constraints ('the neighborhood of hyperbola h about point P on h lies to the left of P') * More general equational constraints ('the distance from P to A plus the distance from P to B is 7' to constrain P to an ellipsoid) * Similarity constraint ('tetrahedron T is similar to tetrahedron U') Some other constraints that seem as though they _would_ fit in this paradigm: * Incidence constraints (some distance(s) should be 0, possibly involving an auxiliary point created for the modeler) * Collinearity constraints (some angle should be π or some area be 0) * Coplanarity constraint (some volume should be 0) Should we go through these, all of which it's likely or at least conceivable we will eventually want to be able to support, and see if they can all be captured by this paradigm in some not-too-contrived way? If so, what might we do if there are some which really feel difficult to be shoehorned into the "constraint-is-a-frozen-observable" paradigm?
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: glen/dyna3#47
No description provided.