ManimCommunity / ManimCommunity/manim

Line object bending in unexpected ways during animation

Open
#4,945 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

## Description of bug / unexpected behavior
Under specific circumstances a `Line` object can bend during an animation in unexpected ways despite `path_arc=0`.

## Expected behavior
A `Line` object should not have any curvature when `path_arc=0`.

## How to reproduce the issue

Code for reproducing the problem

This issue came up in this animation:
```
from manim import *

class Example(Scene):
def construct(self):
t = ValueTracker(0.1 * PI)
line = Line(end=(1,0,0))
line.add_updater(lambda m: m.put_start_and_end_on(
(3.4 , 0, 0),
(3.4 + 1.5*np.cos(t.get_value()), 1.5*np.cos(t.get_value()),0)
)
)

self.add(line)

self.play(
t.animate.set_value(12.1 * PI),
run_time=6,
rate_func=linear,
)
```

which was rendered with this command

```
manim -pql --fps=20 test.py Example
```

I already tried to reduce it to a minimal example. Different quality and frame rate settings produce different curvatures.
The shift in x-direction also influences the curvature.

## Additional media files

Images/GIFs

Image

https://github.com/user-attachments/assets/e3921c3d-5a10-4505-98ad-93ee154affe9

## Logs
Terminal output

```
Manim Community v0.21.0

[08/20/26 09:54:09] DEBUG Hashing ... hashing.py:443
DEBUG Hashing done in 0.001507 s. hashing.py:462
DEBUG Hash generated : 1594855120_2984155222_1892506515 hashing.py:463
DEBUG List of the first few animation hashes of the scene: cairo_renderer.py:101
['1594855120_2984155222_1892506515']
INFO Animation 0 : Partial movie file written in scene_file_writer.py:192
'/home/[...]/wiggly_line_test
/media/videos/test/480p20/partial_movie_files/Example/159
4855120_2984155222_1892506515.mp4'
INFO Combining to Movie file. scene_file_writer.py:952
DEBUG Partial movie files to combine (1 files): scene_file_writer.py:834
['/home/[...]/wiggly_line_tes
t/media/videos/test/480p20/partial_movie_files/Example/15
94855120_2984155222_1892506515.mp4']
INFO scene_file_writer.py:1103
File ready at
'/home/[...]/wiggly_line_tes
t/media/videos/test/480p20/Example.mp4'

INFO Rendered Example scene.py:290
Played 1 animations
```

## System specifications

System Details

- Ubuntu 24.04.4
- Python 3.12.3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the provided minimal Example scene with the stated Manim command and compare different quality and frame-rate settings. Start by tracing Line.put_start_and_end_on during the ValueTracker updater and animation interpolation. Done means a Line with path_arc=0 remains straight throughout the animation, regardless of the tested shift, quality, or frame rate.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.