Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
signed curvature #1085
signed curvature #1085
Changes from 4 commits
72195f8
572766a
10ff1d9
fc4bbf6
bc3f2b9
3a768d3
50bea28
d6d4b4b
64f48fb
9c4b3b1
9591eb2
fe0d15b
bc38b60
9a6e278
6715aef
e8b95aa
5fa3338
abc4a42
2c4ad5c
ca62ef1
f293c62
a40ea3b
8801c4d
6fe0663
da23cc4
12465c1
5ed70e0
fc5d105
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might want to throw a warning if the user passes in bounds like (0, max) since that wouldn't be possible i think (if a circle has curvature -1)? For people used to unsigned curvature this might be confusing. Or maybe we just flip our sign convention so that a circle has positive curvature? though that slighlty conflicts with our convention for surface curvature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could also have a flag for whether to use signed or unsigned curvature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish our sign convention was flipped (positive = convex), but I went with the sign convention we already use for the surface curvature. I would be fine with changing them both.
A closed curve has to be convex at some points, but in theory you could target a curve to be locally concave in certain regions. And I think there is a conceivable use case for targeting positive curvature everywhere, even though it is not possible, to try and force the coils to be straight (low curvature everywhere).
Instead of a flag for signed/unsigned, I think the better solution would be to add a
loss_function="abs"
option. But that can be a separate PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree the sign convention is annoying, I based it on several textbooks which define positive curvature of a surface as curving towards the outward normal vector to the surface.
I don't think we necessarily have to keep the same convention for curves, since signed curvature for non-planar curves isn't even necessarily well defined, and to me it makes more sense to define it such that a circle has positive curvature.
At the very least, I think we should include a note in the docstring for the curvature objective reminding users of the sign convention.