HEX
Server: LiteSpeed
System: Linux houston.panomity.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User: nudepix (1011)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //opt/inneres_merkmal.py
from manim import *

class InneresMerkmal(Scene):
    def construct(self):
        # ========== TITLE ==========
        title = Text(
            "Inneres Merkmal für die Charakterisierung",
            font_size=48,
            color=YELLOW
        )
        title.to_edge(UP)

        # ========== MAIN EXPLANATION TEXT & BOX ==========
        explanation_text = Text(
            """Ein inneres Merkmal benötigt:
- Ein treffendes Adjektiv
- Eine gute Begründung
- 3 Beispiele / Textbelege (mit Zeilenangabe)""",
            font_size=32,
            line_spacing=1.2
        )
        # Constrain width to 80% of the total frame width so text doesn't overflow
        explanation_text.set_max_width(config.frame_width * 0.8)

        explanation_box = SurroundingRectangle(
            explanation_text, buff=0.4, color=BLUE
        )

        explanation_group = VGroup(explanation_box, explanation_text)

        # ========== HIGHLIGHT TRIANGLES FOR BULLET POINTS ==========
        highlight_adjective = Triangle(
            fill_color=GREEN, fill_opacity=1
        ).scale(0.2)
        highlight_adjective.next_to(explanation_text, LEFT, buff=1.0).shift(UP*0.45)

        highlight_begruendung = Triangle(
            fill_color=RED, fill_opacity=1
        ).scale(0.2)
        highlight_begruendung.next_to(explanation_text, LEFT, buff=1.0).shift(DOWN*0.0)

        highlight_examples = Triangle(
            fill_color=ORANGE, fill_opacity=1
        ).scale(0.2)
        highlight_examples.next_to(explanation_text, LEFT, buff=1.0).shift(DOWN*0.45)

        # ========== DETAILS & ARROWS ==========
        adjective_detail = Text(
            "Treffendes Adjektiv\n(z.B. 'ehrgeizig', 'nachdenklich')",
            font_size=26,
            line_spacing=1.0
        )
        adjective_detail.set_max_width(config.frame_width * 0.25)

        adjective_arrow = Arrow(
            start=highlight_adjective.get_right(),
            end=adjective_detail.get_left(),
            buff=0.2,
            color=GREEN
        )
        adjective_group = VGroup(adjective_arrow, adjective_detail)

        begruendung_detail = Text(
            "Gute Begründung\n(Erklärt warum\n das Adjektiv passt)",
            font_size=26,
            line_spacing=1.0
        )
        begruendung_detail.set_max_width(config.frame_width * 0.25)

        begruendung_arrow = Arrow(
            start=highlight_begruendung.get_right(),
            end=begruendung_detail.get_left(),
            buff=0.2,
            color=RED
        )
        begruendung_group = VGroup(begruendung_arrow, begruendung_detail)

        examples_detail = Text(
            "3 Beispiele / Belege\n(mit Zeilenangabe:\nz.B. Z. 12, 15, 19)",
            font_size=26,
            line_spacing=1.0
        )
        examples_detail.set_max_width(config.frame_width * 0.25)

        examples_arrow = Arrow(
            start=highlight_examples.get_right(),
            end=examples_detail.get_left(),
            buff=0.2,
            color=ORANGE
        )
        examples_group = VGroup(examples_arrow, examples_detail)

        # Position these detail groups under the main box, arranged horizontally:
        adjective_group.arrange(RIGHT, buff=0.2)
        begruendung_group.arrange(RIGHT, buff=0.2)
        examples_group.arrange(RIGHT, buff=0.2)

        # We'll put them in a line below the explanation group
        details_line = VGroup(adjective_group, begruendung_group, examples_group).arrange(RIGHT, buff=1.0)
        details_line.next_to(explanation_group, DOWN, buff=1.0)

        # ========== CONCLUSION ==========
        conclusion = Text(
            "Fazit: Charakterisiere treffend mit Adjektiv, Begründung und Belegen!",
            font_size=28,
            color=YELLOW
        )
        conclusion.set_max_width(config.frame_width * 0.9)

        conclusion_box = SurroundingRectangle(conclusion, color=YELLOW, buff=0.3)
        conclusion_group = VGroup(conclusion_box, conclusion)

        # Place conclusion below the details line
        conclusion_group.next_to(details_line, DOWN, buff=1.0)

        # ========== GROUP ALL ELEMENTS & SCALE IF NEEDED ==========
        all_elements = VGroup(
            title,
            explanation_group,
            highlight_adjective, highlight_begruendung, highlight_examples,
            details_line,
            conclusion_group
        )

        # Arrange them vertically from top to bottom:
        # We'll manually place the explanation group below the title.
        explanation_group.next_to(title, DOWN, buff=0.8)

        # Center all elements on screen
        all_elements.move_to(ORIGIN)

        # If the final group is too big, scale it down
        max_scale_factor = 0.9  # how much of the screen we want to fill
        if all_elements.width > config.frame_width * max_scale_factor:
            all_elements.scale_to_fit_width(config.frame_width * max_scale_factor)
        if all_elements.height > config.frame_height * max_scale_factor:
            all_elements.scale_to_fit_height(config.frame_height * max_scale_factor)

        # ========== ANIMATIONS ==========
        self.play(FadeIn(title, shift=UP))
        self.wait(0.5)

        self.play(Create(explanation_box))
        self.play(Write(explanation_text))
        self.wait(1)

        # Highlight bullets
        self.play(FadeIn(highlight_adjective, shift=LEFT))
        self.play(FadeIn(highlight_begruendung, shift=LEFT))
        self.play(FadeIn(highlight_examples, shift=LEFT))
        self.wait(0.5)

        # Arrow & detail text for Adjective
        self.play(Create(adjective_arrow))
        self.play(FadeIn(adjective_detail, shift=RIGHT))
        self.wait(0.5)

        # Arrow & detail text for Begründung
        self.play(Create(begruendung_arrow))
        self.play(FadeIn(begruendung_detail, shift=RIGHT))
        self.wait(0.5)

        # Arrow & detail text for Beispiele
        self.play(Create(examples_arrow))
        self.play(FadeIn(examples_detail, shift=RIGHT))
        self.wait(1)

        # Conclusion
        self.play(FadeIn(conclusion, shift=DOWN))
        self.play(Create(conclusion_box))
        self.wait(2)

        # Fade out everything
        self.play(FadeOut(all_elements))
        self.wait()