Question Details

No question body available.

Tags

python manim

Answers (2)

January 28, 2026 Score: 1 Rep: 11 Quality: Low Completeness: 60%

You can use config.rightside and add it to the coordinates of the right line's ends.

However, I did see that config.rightside didn't exactly sit at the end of the frame, like you said. So with framewidth of 8.0, I added around 3 to the coords.

Config I used to get portrait mode from a GitHub issue in manim:

config.frameheight = 14.222222222222221
config.framewidth = 8.0
config.framesize = (1080,1920)

And wrote something like:

self.add(Line([0, 1, 0], [0, -1, 0]))
self.play(Create(Line( config.rightside + [2.8,1,0], config.rightside + [2.8,-1,0] )))

You can similarly add this to the end coordinate of the arrow like:

self.play(Create(Arrow([-1, -1, 0], config.rightside + [3, 1, 0], 
 color=ManimColor('#00FF00'), 
 maxtiplengthtolengthratio=.1), run_time=.5))

You can play around with these values and get want you want to show, I guess. This is a hardcoded solution.

Here's what this looks like:

result

January 28, 2026 Score: 0 Rep: 112 Quality: Low Completeness: 80%

Manim doesn't "rotate" your arrow unless you tell it to. A Transform will interpolate (default is unclear to me) the underlying points of the two shapes. That interpolation (any possible interpolation method) often looks like the arrow is warping/skewing inside a bounding box (you called: "invisible square") before it settles.

If your intention is to rotate (windmill) then just:

bluearrow = Arrow([-1, -.71, 0], [1, .37, 0], color=BLUE, maxtiplengthtolengthratio=.1)
self.add(bluearrow)

rotate around its start point (pivot)

self.play(blue
arrow.animate.rotate(PI/6, aboutpoint=bluearrow.getstart()), runtime=0.6)

Nonetheless, I'd rotate (if that's aligned with your goal) by continuously aiming at "an object" (in this case: the dot):

from manim import *

class S(Scene): def construct(self): start = np.array([-1, -.71, 0]) target = Dot([.9, .32, 0], color=BLUE)

theta = ValueTracker(0)

bluearrow = alwaysredraw(lambda: Arrow( start, start + rotatevector(np.array([2.0, 1.08, 0]), theta.getvalue()), color=BLUE, maxtiplengthtolengthratio=0.1 ) )

self.add(target, blue
arrow) self.play(theta.animate.setvalue(PI/4), runtime=1.0)