mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Arcs can now have tips on either side
Todo: tips on both sides, eliminate overshoot
This commit is contained in:
parent
1d6d3b3717
commit
6e1c84a305
1 changed files with 5 additions and 2 deletions
|
@ -36,9 +36,12 @@ class Arc(VMobject):
|
|||
)
|
||||
self.scale(self.radius, about_point = ORIGIN)
|
||||
|
||||
def add_tip(self, tip_length = 0.25):
|
||||
def add_tip(self, tip_length = 0.25, end = 0):
|
||||
#TODO, do this a better way
|
||||
p1, p2 = self.points[-2:]
|
||||
if end == 1:
|
||||
p1, p2 = self.points[-2:]
|
||||
else:
|
||||
p2, p1 = self.points[:2]
|
||||
arrow = Arrow(
|
||||
p1, 2*p2 - p1,
|
||||
tip_length = tip_length,
|
||||
|
|
Loading…
Add table
Reference in a new issue