以优雅/自动化的方式制作我的单框 Tikz Beamer 以多框显示

以优雅/自动化的方式制作我的单框 Tikz Beamer 以多框显示

我希望这个单帧投影仪能够在多帧中逐步显示

\documentclass[compress]{beamer}
\usepackage    {tikz}
\usetheme      {Warsaw}
\usetikzlibrary{3d}

%
\makeatletter
\setlength{\@fptop}{0pt}
\makeatother
%
\usepackage{tikz,tgtermes,float}% times is deprecated - use one of the other options
\usetikzlibrary{mindmap,trees}
\definecolor{mypink3}{cmyk}{0, 0.7808, 0.4429, 0.1412}
\definecolor{yel}{rgb}{0.898, 0.6196, 0.14}
\definecolor{blue1}{rgb}{0.11, 0.5, 0.9}

\begin{document}
    \begin{frame}{Test with bricks}
        \centering
        \begin{tikzpicture}[scale=0.6, transform shape, % <---
            line join=round]%,trim left={(-3,0)}, trim right={(5.5,0)}] 
            \path [
            mindmap,
            every node/.append style={text=white},
            level 1 concept/.append style={level distance=180, sibling angle=30, font=\large\sffamily\bfseries},
        level 2 concept/.append style={level distance=90, font=\sffamily\bfseries},
        concept color=yel!90!black,
        ]
        node [concept, font=\Huge\sffamily\bfseries, ball color=yel!90!black,  inner sep=10] (Mother of Mothers) {Mother of Mothers}[counterclockwise from=70] 
        
        child [concept color=mypink3!90!black] {
                node [concept, inner sep=10, ball color=mypink3!90!black] (Mother 1) {Mother 1}
                child[grow=75, concept color=blue1!90!black] {
                    node [concept,  inner sep=5, ball color=blue1!90!black] (Child 11) {Child 1, 1}
                } 
                child [grow=75, clockwise from=45, concept color=blue1!90!black ] {
                    node [concept, inner sep=5, ball color=blue1!90!black] (Child 12) {Child 1, 2}
                }
                child [grow=75, clockwise from=149, concept color=blue1!140!black ] {
                    node [concept, inner sep=5, ball color=blue1!90!black] (Child 13) {Child 1, 3}
                }
            }
        child [concept color=mypink3!90!black] {
                node [concept,  inner sep=10, ball color=mypink3!90!black] (Mother 2) {Mother 2}
                child [concept color=blue1!90!black, grow=60] {
                    node [concept, inner sep=5, ball color=blue1!90!black] (Child 21) {Child 2, 1}
                }
                child [concept color=blue1!90!black, grow=103] {
                    node [concept, inner sep=5, ball color=blue1!90!black] (Child 22) {Child 2, 2}
                }
            }
        child [concept color=mypink3!90!black] {
                node [concept,  inner sep=10, ball color=mypink3!90!black] (Mother 3) {Mother 3}
                child [concept color=blue1!90!black, grow=130] {
                    node [concept, inner sep=5, ball color=blue1!90!black] (Child 31) {Child 3, 1}
                }
                child [concept color=blue1!90!black, grow=171] {
                    node [concept, inner sep=5, ball color=blue1!90!black] (Child 32) {Child 32}
                }
                child [concept color=blue1!90!black, grow=87] {
                    node [concept, inner sep=5, ball color=blue1!90!black] (Child 33) {Child 3, 3}
                }
            }
        child [concept color=mypink3!90!black] {
                node [concept,  inner sep=10, ball color=mypink3!90!black] (Mother 4) {Mother 4}
                [counterclockwise from=180]
                child [concept color=blue1!90!black, grow=150] {
                    node [concept, inner sep=5, ball color=blue1!90!black] (Child 41) {Child 4,1}
                }
                child [concept color=blue1!90!black, grow=195] {
                    node [concept, inner sep=5, ball color=blue1!90!black] (Child 42) {Child 4,2}
                    }
                }
            ;
        \end{tikzpicture}
    \end{frame}
\end{document}

这里的单框投影机

我希望它看起来像这里的第一个答案

在此GIF 图片

答案1

我写这篇文章是为了感谢@Markus G。他/她通过他的评论指导我该怎么做,我觉得很有用。为了记录目的,也为了那些可能寻找此类解决方案的人。

\documentclass[compress]{beamer}
\usepackage    {tikz}
\usetheme      {Warsaw}
\usetikzlibrary{3d}

%
\makeatletter
\setlength{\@fptop}{0pt}
\makeatother
%
\usepackage{tikz,tgtermes,float}% times is deprecated - use one of the other options
\usetikzlibrary{mindmap,trees}
\definecolor{mypink3}{cmyk}{0, 0.7808, 0.4429, 0.1412}
\definecolor{yel}{rgb}{0.898, 0.6196, 0.14}
\definecolor{blue1}{rgb}{0.11, 0.5, 0.9}

\tikzset{
    invisible/.style={opacity=0},
    visible on/.style={alt={#1{}{invisible}}},
    alt/.code args={<#1>#2#3}{%
        \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
    },
}

\begin{document}
    \begin{frame}{Test with bricks}
        \centering
        \begin{tikzpicture}[scale=0.6, transform shape, % <---
            line join=round]%,trim left={(-3,0)}, trim right={(5.5,0)}] 
            \path [
            mindmap,
            every node/.append style={text=white},
            level 1 concept/.append style={level distance=180, sibling angle=30, font=\large\sffamily\bfseries},
        level 2 concept/.append style={level distance=90, font=\sffamily\bfseries},
        concept color=yel!90!black,
        ]
        node [concept, font=\Huge\sffamily\bfseries, ball color=yel!90!black,  inner sep=10] (Mother of Mothers) {Mother of Mothers}[counterclockwise from=70] 
        
        child [concept color=mypink3!90!black, visible on=<2->] {
            node [concept, inner sep=10, ball color=mypink3!90!black] (Mother 1) {Mother 1}
            child[grow=75, concept color=blue1!90!black, visible on=<3->] {
                node [concept,  inner sep=5, ball color=blue1!90!black] (Child 11) {Child 1, 1}
            } 
            child [grow=75, clockwise from=45, concept color=blue1!90!black, visible on=<4-> ] {
                node [concept, inner sep=5, ball color=blue1!90!black] (Child 12) {Child 1, 2}
            }
            child [grow=75, clockwise from=149, concept color=blue1!140!black, visible on=<5-> ] {
                node [concept, inner sep=5, ball color=blue1!90!black] (Child 13) {Child 1, 3}
            }
        }
        child [concept color=mypink3!90!black, visible on=<6->] {
            node [concept,  inner sep=10, ball color=mypink3!90!black] (Mother 2) {Mother 2}
            child [concept color=blue1!90!black, grow=60, visible on=<7->] {
                node [concept, inner sep=5, ball color=blue1!90!black] (Child 21) {Child 2, 1}
            }
            child [concept color=blue1!90!black, grow=103, visible on=<8->] {
                node [concept, inner sep=5, ball color=blue1!90!black] (Child 22) {Child 2, 2}
            }
        }
        child [concept color=mypink3!90!black, visible on=<9->] {
            node [concept,  inner sep=10, ball color=mypink3!90!black] (Mother 3) {Mother 3}
            child [concept color=blue1!90!black, grow=130, visible on=<10->] {
                node [concept, inner sep=5, ball color=blue1!90!black] (Child 31) {Child 3, 1}
            }
            child [concept color=blue1!90!black, grow=171, visible on=<11->] {
                node [concept, inner sep=5, ball color=blue1!90!black] (Child 32) {Child 32}
            }
            child [concept color=blue1!90!black, grow=87, visible on=<12->] {
                node [concept, inner sep=5, ball color=blue1!90!black] (Child 33) {Child 3, 3}
            }
        }
        child [concept color=mypink3!90!black, visible on=<13->] {
            node [concept,  inner sep=10, ball color=mypink3!90!black] (Mother 4) {Mother 4}
            [counterclockwise from=180]
                child [concept color=blue1!90!black, grow=150, visible on=<14->] {
                    node [concept, inner sep=5, ball color=blue1!90!black] (Child 41) {Child 4,1}
                }
                child [concept color=blue1!90!black, grow=195, visible on=<15->] {
                    node [concept, inner sep=5, ball color=blue1!90!black] (Child 42) {Child 4,2}
                }
            }
            ;
        \end{tikzpicture}
    \end{frame}
\end{document}

以下是 .GIF 格式的输出

相关内容