Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageMobject in ThreeDScene Camera Move Issue #3146

Open
Tracked by #3482
helblazer811 opened this issue Feb 2, 2023 · 1 comment
Open
Tracked by #3482

ImageMobject in ThreeDScene Camera Move Issue #3146

helblazer811 opened this issue Feb 2, 2023 · 1 comment

Comments

@helblazer811
Copy link

helblazer811 commented Feb 2, 2023

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.

NeuralNetworkScene.mp4

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])
            )
        )
@helblazer811
Copy link
Author

This could be related to #3131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging a pull request may close this issue.

2 participants