Skip to content
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

DashedVMobject should have dash_legth much like DashedLine #3996

Open
hmeine opened this issue Nov 4, 2024 · 0 comments
Open

DashedVMobject should have dash_legth much like DashedLine #3996

hmeine opened this issue Nov 4, 2024 · 0 comments
Labels
new feature Enhancement specifically adding a new feature (feature request should be used for issues instead)

Comments

@hmeine
Copy link

hmeine commented Nov 4, 2024

Description of proposed feature

DashedVMobject should allow for fixed-length dashes independent of the length of the underlying curves. DashedLine does, by computing the length of the curve in __init__ (see #3989), but DashedVMobject does not. This makes animated dashed CubicBeziers for example quite ugly, since their dashes will be stretched, leading not only to temporal inconsistencies, but also to inconsistencies between different-length curves (unless users find ways to compute the correct num_dashes, which I did not yet).

How can the new feature be used?

Connections between entities can be visualized with lines or curves, the style of which conveys some meaning (type of connection / relation). If the dash length is consistent, the style will be perceived as the same, so it is possible to use dashing as an indication of the type of connection / relation.

Additional comments

I looked into the implementation myself, and initially thought the reason for this is that the length of arbitrary VMobjects is hard to compute / not available. However, there is already the equal_lengths argument (defaulting to True), which causes the approximate length to be computed.

When further trying to come up with a PR, I found that the current default of num_dashes=15 prevents a backwards-compatible introduction of dash_length: float = DEFAULT_DASH_LENGTH as in DashedLine. I would suggest to really have the latter as new default behavior, but that is obviously something to be discussed and decided on.

@hmeine hmeine added the new feature Enhancement specifically adding a new feature (feature request should be used for issues instead) label Nov 4, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Dev Board Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Enhancement specifically adding a new feature (feature request should be used for issues instead)
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant