Skip to content

Add point-circle centrality constraint - #69

Draft
tomcur wants to merge 1 commit into
mainfrom
point-circle-centrality
Draft

Add point-circle centrality constraint#69
tomcur wants to merge 1 commit into
mainfrom
point-circle-centrality

Conversation

@tomcur

@tomcur tomcur commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

On top of #68.

This adds a point-circle centrality constraint, reusing the expressions introduced for point-point coincidence.

Comment on lines +512 to +526
system.add_constraint(
ConstraintTag::PointCircleCentrality,
[
expressions::VariableVariableEquality {
variable1_idx: point_idx,
variable2_idx: circle_center_idx,
}
.into(),
expressions::VariableVariableEquality {
variable1_idx: point_idx + 1,
variable2_idx: circle_center_idx + 1,
}
.into(),
],
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this does not introduce any new expressions, it's conceptually very similar to PointPointCoincidence.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Also having valency 2.)

@waywardmonkeys

Copy link
Copy Markdown
Contributor

If we keep referencing, then this is the same as point-point-coincident constraint! (And I think we should keep referencing as we've been discussing on a call.)

@tomcur

tomcur commented Aug 15, 2025

Copy link
Copy Markdown
Contributor Author

If we keep referencing, then this is the same as point-point-coincident constraint! (And I think we should keep referencing as we've been discussing on a call.)

Indeed, I'll convert this to draft for now; and if we keep referencing, we should probably close this as to not have too many ways of doing the same thing.

For posterity, I'll paste part of our thinking on referencing (and related topics) posted elsewhere here:

We're thinking more about constraint graph analysis, and how that'd work with referencing. It's especially the degree-of-freedom counting that is complicated, as, say, a boundless line in 2D has two degrees of freedom, even if it is defined by referencing two points that have four degrees of freedom in total. Constraints can be placed on those points and the line separately, which needs to be held into account when analyzing the system. Then, separately, you may have constraints that take away specific types of degrees of freedom (like a constraint on a circle's circumference taking away the degree of freedom of the radius, and not the location, which ideally you detect).

@tomcur
tomcur marked this pull request as draft August 15, 2025 13:50
@tomcur
tomcur force-pushed the point-circle-centrality branch from 918c9ba to 92e57d1 Compare August 15, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants