manim icon indicating copy to clipboard operation
manim copied to clipboard

Incorrect Positioning of Fixed Orientation Mobjects in OpenGL

Open sudgy opened this issue 3 years ago • 0 comments

Consider the following scene:

class Test(ThreeDScene):
    def construct(self):
        self.camera.set_phi(TAU/6)
        self.begin_ambient_camera_rotation(rate=0.5)
        u = Vector(2*RIGHT, color = RED)
        u_label = MathTex("1.0 \\vec u")
        u_label.next_to(u.get_end(), RIGHT, buff = 0)
        v = Vector(2*LEFT, color = YELLOW)
        v_label = MathTex("1.0 \\vec v")
        v_label.next_to(v.get_end(), LEFT, buff = 0)
        self.add(u, v)
        self.add_fixed_orientation_mobjects(u_label, v_label)
        self.wait(TAU*2)

Here is the result of rendering with the opengl renderer:

TestGL

As you can see, the label's position changes over time when it shouldn't. With cairo, the problem isn't there:

TestCairo

sudgy avatar Sep 16 '22 23:09 sudgy