Sketch implementation

Vectornaut 2025-03-20 22:05:37 +00:00
parent 53630f6707
commit 7863779784

@ -34,6 +34,64 @@ Maybe being subject to a constraint can then be seen as a kind of incidence.
***To do:** Explore ideas for unifying elements and observables in spite of the contrasts described above.*
## Implementation
*Some thoughts on how to organize elements and observables in our code.*
### Requirements
#### User interface
- Filter regulators by subject.
- Look up a single-subject regulator by subject and type.
- When an element is the sole subject of a regulator, we'll probably want some views of the element to include a view of that regulator. For example, we might want every sphere to come with a radius regulator, with an inline radius control in a list view of the sphere.
#### Engine communication
- Pack element and constraint data into the format the engine uses.
- This requires iteration over all elements and constraints.
### Structures
#### Constraint problem
A constraint problem description that can be passed into the engine.
Fields:
- Gram matrix
- Initial configuration guess
- Frozen entries
#### Constraint satisfier
A constraint problem solution that can be returned by the engine
Fields:
- Configuration
- Tangent space
### Traits
#### Element
Methods:
- Write to constraint problem
- Representation
- Self-product
- Read from constraint satisfier
- Representation
#### Regulator
- Get measurement signal
- Get set point signal
- Write to constraint problem
- Gram matrix entry (for product constraints)
- Index and value of frozen entry (for frozen entry constraints)
## Questions related to variables and linked constraints
* Could a Scalar be an element? I.e., a "free-floating" real number?