Skip to content

Refactored Polygon class#4762

Open
GoThrones wants to merge 1 commit into
ManimCommunity:mainfrom
GoThrones:polygram
Open

Refactored Polygon class#4762
GoThrones wants to merge 1 commit into
ManimCommunity:mainfrom
GoThrones:polygram

Conversation

@GoThrones
Copy link
Copy Markdown
Contributor

@GoThrones GoThrones commented Jun 2, 2026

Overview: What does this pull request change?

Change introduced by this PR is completely backwards compatible.

This PR makes it possible for users to pass a 2D array of points, as vertices to Polygon class. In main branch, vertices can only be passed as individual points separated by comma. But in Polygram class, which is the Parent class of Polygon, vertices is a 2D array or points. In order to have uniformity in passing the type of value to vertices, this change is required.
Users can still pass series of points to Polygon class if they want to, as legacy code allowed.

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

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.

1 participant