背景色を変更する

背景色を変更する†

Manim CEにおいて、標準の背景色は黒ですが、他の色に変更したい場合は、self.camera.background_colorに以下のように色を指定します。

from manim import *

class ChangeBackgroundColor(Scene):

    def __init__(self):
        super().__init__()
        self.camera.background_color = GOLD_A
        
    def construct(self):
        vof_desc1 = Text('VOF法によるコンクリート流動解析', color=BLACK, font_size=36, font='Meiryo').to_edge(UP, buff=0.5)
        self.add(vof_desc1)

作成された図は以下の通りです。

 ChangeBackgroundColor

添付ファイル: fileChangeBackgroundColor.png 252件 [詳細]
Last-modified: 2024-06-12 (水) 08:12:34