Skip to content

Conversation

mathsvisualization
Copy link

Motivation

StrokeArrow did not preserve the tip geometry correctly for certain arc angles.
The arrow tips could disappear, distort, or scale incorrectly depending on the arc length.

Proposed changes

  • Fixed condition in insert_tip_anchor to properly handle arc length and tip length.
  • Replaced pointwise_become_partial with start_new_path to avoid distorted geometry.
  • Updated create_tip_with_stroke_width to compute tip_width using original_stroke_width for consistent tip geometry.
  • Removed redundant and buggy code paths.

Test

Code used:

from manimlib import *

class FixStrokeArrow(InteractiveScene):
    def construct(self):
        arrows = VGroup()
        for angle in [0, 45, 90, 135, 180]:
            arrow = StrokeArrow(LEFT, RIGHT, path_arc=-angle*DEGREES)
            arrows.add(arrow)
        arrows.arrange(DOWN)
        self.add(arrows)

Result

Before

Screenshot 2025-09-16 15-28-16

After

Screenshot 2025-09-16 15-29-36

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