복합 기능 세트 다이어그램

복합 기능 세트 다이어그램

다음 아름다운 다이어그램을 마무리하는 데 도움을 줄 수 있는 친절한 사람이 있습니까? 노란색 곡선을 그려야 해요.

감사합니다

복합 기능

\documentclass[]{article}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning,shapes,fit,calc}
\begin{document}
COMPOSITE FUNCTIONS\\
\begin{center}
    \begin{tikzpicture}[
    >=stealth,
    bullet/.style={
        fill=black,
        circle,
        minimum width=1pt,
        inner sep=1pt
    },
    projection/.style={
        ->,
        thick,
        shorten <=2pt,
        shorten >=2pt
    },
    every fit/.style={
        ellipse,
        draw,
        inner sep=0pt
    }
    ]
    \node at (2,4.7) {$f$};
    \draw[projection] (1,4.5) -- (3,4.5);
    \node at (0,5) {$X$};
    \node[bullet,label=below:$x$]    at (0,2.5){};
    \node at (4,5) {$Y$};
    \node[bullet,label=below:$f(x)$] at (4,2.5){};
    \node at (6,4.7) {$g$};
    \draw[projection] (5,4.5) -- (7,4.5);
    \node at (8,5) {$Z$};
    \node[bullet,label=below:$g\big(f(x)\big)$] at (8,2.5){};

    \draw (0,2.5) ellipse (1.02cm and 2.2cm);
    \draw (4,2.5) ellipse (1.02cm and 2.2cm);
    \draw (8,2.5) ellipse (1.02cm and 2.2cm);

    \draw[projection] (0.3,2.5) -- (3.7,2.5);
    \draw[projection] (4.3,2.5) -- (7.7,2.5);
    \end{tikzpicture}
    \newline
\end{center}
\end{document}

답변1

이를 수행하는 한 가지 방법은 구문을 사용 하고 및 각도를 to지정하는 것 입니다 .outin

\draw [line width=8pt, yellow, shorten <=0.25cm, shorten >=0.6cm, ->] 
    (START.south) to[out=-50, in=-120, distance=4cm, ] (END);

여기에 이미지 설명을 입력하세요

암호:

\documentclass[]{article}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning,shapes,fit,calc}
\begin{document}
COMPOSITE FUNCTIONS\\
\begin{center}
    \begin{tikzpicture}[
    >=stealth,
    bullet/.style={
        fill=black,
        circle,
        minimum width=1pt,
        inner sep=1pt
    },
    projection/.style={
        ->,
        thick,
        shorten <=2pt,
        shorten >=2pt
    },
    every fit/.style={
        ellipse,
        draw,
        inner sep=0pt
    }
    ]
    \node at (2,4.7) {$f$};
    \draw[projection] (1,4.5) -- (3,4.5);
    \node at (0,5) {$X$};
    \node[bullet,label=below:$x$] (START)   at (0,2.5){};
    \node at (4,5) {$Y$};
    \node[bullet,label=below:$f(x)$] at (4,2.5){};
    \node at (6,4.7) {$g$};
    \draw[projection] (5,4.5) -- (7,4.5);
    \node at (8,5) {$Z$};
    \node[bullet,label=below:$g\big(f(x)\big)$] (END) at (8,2.5){};
    
    \draw [line width=8pt, yellow, shorten <=0.25cm,, shorten >=0.6cm, ->] (START.south) to[out=-50, in=-120, distance=4cm, ] (END);

    \draw (0,2.5) ellipse (1.02cm and 2.2cm);
    \draw (4,2.5) ellipse (1.02cm and 2.2cm);
    \draw (8,2.5) ellipse (1.02cm and 2.2cm);

    \draw[projection] (0.3,2.5) -- (3.7,2.5);
    \draw[projection] (4.3,2.5) -- (7.7,2.5);
    \end{tikzpicture}
    \newline
\end{center}
\end{document}

답변2

나는 이것이 이미 답변되었다는 것을 알고 있지만 유용한 것을 발견할 경우를 대비해 내 솔루션을 게시할 것입니다. Peter Grill은 이미 and 를 to사용 하는 방법을 보여주었으므로 여기서는 다음을 사용하는 방법을 제시합니다 .inoutcontrols

\documentclass[]{article}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning,shapes,fit,calc}
\begin{document}
\textsc{Composite Functions:}
\begin{center}
  \begin{tikzpicture}[
      >=stealth,
      bullet/.style={
        fill=black,
        circle,
        inner sep=1pt
      },
      projection/.style={
        ->,
        thick,
        shorten <=2pt,
        shorten >=2pt
      },
    ]

    \draw (0, 0) circle [x radius=2, y radius=3];
    \node [bullet, label=below:\(x\)] (x) at (-1, -0.5) {};
    \node[font=\large] (X) at (0, 4) {\(X\)};

    \begin{scope}[xshift=4cm]
      \draw (0, 0) circle [x radius=1, y radius=3.5]; \node [bullet,
      label=above:\(f(x)\)] (fx) at (0.3, 2) {};
      \node[font=\large] (Y) at (0, 4) {\(Y\)};
    \end{scope}
    \begin{scope}[xshift=8cm]
      \draw (0, 0) circle [x radius=2, y radius=1.5]; \node [bullet,
      label=below:\(g(f(x))\)] (gfx) at (-0.5, -0.1) {};
      \node[font=\large] (Z) at (0, 4) {\(Z\)};
    \end{scope}

    \draw [projection] (x) -- (fx);
    \draw [projection] (fx) -- (gfx);
    \draw [projection] (X) -- (Y)
          node [pos=0.5, above] {\(f\)};
    \draw [projection] (Y) -- (Z)
          node [pos=0.5, above] {\(g\)};
    \draw [out=45, in=180-45, projection, line width=1.5pt, red!80!black] 
          (X) .. controls ++(1, 1) and ++(-1, 1) .. (Z)
          node [pos=0.5, above] {\(f \circ g\)};
  \end{tikzpicture}
\end{center}
\end{document}

이는 다음을 생성합니다.

산출

답변3

\begin{center}
  \begin{tikzpicture}[
      >=stealth,
      bullet/.style={
        fill=black,
        circle,
        inner sep=1pt
      },
      projection/.style={
        ->,
        thick,
        shorten <=2pt,
        shorten >=2pt
      },
    ]
    
    \node[font=\large] (X) at (0, 4) {\(X_1\)};

    \begin{scope}[xshift=4cm]
      \node[font=\large] (Y) at (0, 4) {\(X_2\)};
    \end{scope}
    \begin{scope}[xshift=8cm]      
      \node[font=\large] (Z) at (0, 4) {\(X_3\)};
    \end{scope}
        
    \draw [projection] (X) -- (Y)
          node [pos=0.5, above] {\(f\)};
    \draw [projection] (Y) -- (Z)
          node [pos=0.5, above] {\(g\)};
    \draw [out=45, in=180-45, projection, line width=1.5pt, red!80!black] 
          (X) .. controls ++(1, 1) and ++(-1, 1) .. (Z)
          node [pos=0.5, above] {\(g \circ f\)};
  \end{tikzpicture}
\end{center}

관련 정보