3b1b / manim

Animation engine for explanatory math videos
MIT License
70.79k stars 6.23k forks source link

fix aspect_ratio other than 16:9 issue #2056

Closed germanzhu closed 2 months ago

germanzhu commented 1 year ago

Motivation

Video is squished on using aspect ratios other than 1920x1080 or 16:9.

This PR attempts to address this issue.

Proposed changes

Test

Code:

from manimlib import *

class Video(Scene):

    def construct(self):
        s = Square()
        c = Circle()
        self.play(ShowCreation(s))
        self.play(Transform(s,c))

manimgl test.py -r 1080x1920 -wo

Result:

https://github.com/3b1b/manim/assets/15604323/ba2a72f3-6bb2-4fcb-85d9-62d7473cc495