You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Manim库制作动画时仅显示半个圆形的问题求助

解决Manim渲染仅显示半个圆形的问题

常见修复方案

  • 适配版本差异
    不同Manim版本(3b1b原版/社区版)的动画行为有区别,可替换动画类型并确保边框可见:

    from manim import *
    
    class CreateCircle(Scene):
        def construct(self):
            circle = Circle()
            circle.set_fill(PINK, opacity=0.5)
            circle.set_stroke(width=2)  # 保证边框宽度足够
            self.play(DrawBorderThenFill(circle))  # 替换Create为该动画
    
  • 调整相机视口
    若相机默认范围未完全包含图形,手动设置相机宽度:

    from manim import *
    
    class CreateCircle(Scene):
        def construct(self):
            self.camera.frame.set(width=4)  # 缩小相机范围,确保圆形完整显示
            circle = Circle()
            circle.set_fill(PINK, opacity=0.5)
            self.play(Create(circle))
    
  • 检查渲染命令
    避免使用过低分辨率参数,推荐用预览级渲染命令:

    manim -pql your_file.py CreateCircle
    
  • 重置配置文件
    若之前修改过Manim配置,删除本地manim.cfg文件恢复默认设置后重新渲染。


内容的提问来源于stack exchange,提问作者Projects Gift Gun

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.08 21:23:15