ManimCommunity / ManimCommunity/manim

Rotating a point on a ellipse

Open
#2,378 1 comment 0 reactions 0 assignees View on GitHub
issue:bug
Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

## Description of bug / unexpected behavior

When creating the typical representation of the ellipse with a rotating point and segments to the focuses, the animation do not finish over the horizontal axis.

## Expected behavior

The point must rotate TAU radians and finish its trajectory on the horizontal axis.
## How to reproduce the issue

Code for reproducing the problem

```py
class elipse(Scene):
def construct(self):

elipse = Ellipse(width=5.6, height=4.0, color=BLUE)
foco1 = Dot().move_to(1.96*LEFT)
foco2 = Dot().move_to(1.96*RIGHT)

t = ValueTracker(0)

dot = always_redraw(lambda : Dot(elipse.point_at_angle(t.get_value())))
line_L = always_redraw(lambda : Line(start = foco2.get_center(), end = dot.get_center(), color = RED, buff = 0.1))
Line_R = always_redraw(lambda : Line(start = foco1.get_center(), end = dot.get_center(), color = GREEN, buff = 0.1))

self.add(elipse)
self.add(dot,foco1,foco2)
self.play(Create(Line_R), Create(line_L))
self.play(t.animate.set_value(TAU),run_time=5, rate_func=linear)
```

## Additional comments

As ad_chaos suggested me in discord, the problem is solved by adding self.wait() at the end of the code.

Contributor guide

Open the contributing guide

Research direction

Run the provided Python scene with the Ellipse, ValueTracker, and animated point to reproduce the endpoint behavior. Compare the result with and without the reported self.wait() workaround, then inspect the point_at_angle and animation completion behavior; done means the point completes one TAU rotation on the horizontal axis without requiring the extra wait.

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
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.