Repository navigation
Preserve ellipse size when constructing from polynomial coefficients - #290
Open
xixihaha-ha wants to merge 1 commit into
Open
xixihaha-ha wants to merge 1 commit into
xixihaha-ha wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Ellipse.Polynomial([1, 1, 0, 0, 0, -4])currently returns a unit circle, although the equation isx**2 + y**2 = 4and the radius should be 2. The constant coefficient is ignored unless a perimeter point is supplied.Normalize the ellipse matrix after completing the square, using the constant term and the computed centre. Preserve the optional perimeter-point override and clarify that both supported coefficient formats determine the ellipse size.
Regression tests cover circles at the origin and translated circles, coefficient rescaling, rotated ellipses, and the five-coefficient form. Against unchanged master (
25b19b3), five new subcases fail; all seven pass with the fix. Full suite on Windows/Python 3.11.14: 567 passed, 4 skipped, 106 subtests passed. Black 23.10.0 andgit diff --checkpass.Implementation and tests prepared and validated with OpenAI Codex assistance.