ManimCommunity / ManimCommunity/manim
ImageMobject in ThreeDScene Camera Move Issue
Open
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
When I do a move animation on the the frame_center in a ThreeDScene, an ImageMobject is shifted a different amount from the rest of the mobjects in the scene.
Expected behavior
Both the Square and the ImageMobject should move the same amount.
How to reproduce the issue
from manim import *
from PIL import Image
import numpy as np
class NeuralNetworkScene(ThreeDScene):
"""Test Scene for the Neural Network"""
def construct(self):
# Make the Layer object
image = Image.open("../assets/mnist/digit.jpeg")
numpy_image = np.asarray(image)
square = Square().shift([0.0, 2.5, 0.0])
self.add(square)
image_mobject = ImageMobject(
numpy_image,
image_mode="RGB"
).scale(10)
self.add(image_mobject)
self.play(
self.camera._frame_center.animate.shift(
np.array([3.0, 0.0, 0])
)
)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the provided NeuralNetworkScene snippet, focusing on ThreeDScene, ImageMobject, and camera._frame_center.animate.shift. Compare the ImageMobject and Square positions during the camera move; done means both objects shift by the same amount.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100