제작 예정 피규어

제작 예정 피규어

이 그림을 정확하게 재현해야 하는데 같은 결과가 나오지 않습니다.

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

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{center}
        \definecolor{qqwuqq}{rgb}{0,0.39215686274509803,0}
            \definecolor{uuuuuu}{rgb}{0.26666666666666666,0.26666666666666666,0.26666666666666666}
            \definecolor{qqqqff}{rgb}{0,0,1}
            \begin{tikzpicture}[
            line cap=round,
            line join=round,
            >=stealth,
            lbl/.style={draw,circle},
        %   x=1cm,y=1cm
            ]
            \coordinate[label=below left:] (A) at (0,0);
            \coordinate[label=below left:] (B) at (6,0);
            \coordinate[label=below left:] (C) at (0,3.35);
            \coordinate[label=below left:] (D) at (-3,1);
            \coordinate[label=below left:] (E) at (-2,2);
            \coordinate[label=below left:] (F) at (2.66,1.51);
            \coordinate[label=below left:] (G) at (2.88,0.75);
            \coordinate[label=below left:] (H) at (1.52,-1.35);
            \coordinate[label=below left:] (I) at (-1.78,-0.91);
            \coordinate[label=below left:] (J) at (-2.84,-0.09);
            \coordinate[label=below left:] (K) at (-3.1,0.39);

            \draw [->,line width=0.8pt] (A) -- (B) node[midway, above] {};

            \draw [->,line width=0.8pt] (A) -- (C) node[midway, above] {};

            \draw [-,line width=0.8pt] plot [smooth, tension=1] coordinates {(D) (E) (F)};

            \draw [-,line width=0.8pt] plot [smooth, tension=1] coordinates {(F) (G) (H)};

            \draw [-,line width=0.8pt] plot [smooth, tension=1] coordinates {(H) (I) (J)};

            \draw [-,line width=0.8pt] plot [smooth, tension=1] coordinates {(J) (K) (D)};

            
            %\node[text width=6.2cm] at (1,2) {$\partial \mathbb{S}$};
         \end{tikzpicture}
    \end{center}

\end{document}

결과 :

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

답변1

이를 수행하는 방법은 다음과 같습니다. 몇 가지 참고사항:

  • pgfmanual에서 내가 사용하는 모든 명령을 찾아보세요
  • 코드를 단순화하고 재사용하기 위해 더 많은 적합한 스타일을 정의하고 사용합니다.
  • 제안: 자신을 위한 댓글도 더 많이 남겨주세요.
  • 정의된 색상을 사용하지 않았습니다 ...
  • 해당 지역의 좌표를 삭제하겠습니다. 보다간단하게 시작하다그리고다음 개선
  • in- 및 - 각도를 조정하면 out가장자리를 포함하여 놀라운 결과를 얻을 수 있습니다(조금 시도해 보세요).
  • x축과 y축의 노드에 앵커 배치
  • 수학 라벨의 경우 두 가지 단축키를 사용 \ms했고\fs
  • \usepackage{amsfonts,amsmath}표시하려면 로드해야 합니다 .
  • 시그마에 이중 밑줄을 긋는 것은 초보자에게 힘든 일입니다. 댓글의 두 링크를 참조하세요. 내 것은 이것들을 기반으로 한 근사치입니다

결과

\documentclass{article}
\usepackage{tikz}
\usepackage{amsfonts,amsmath}


% ~~~ redefining \vec ~~~~~~~~~~~
%     see: https://tex.stackexchange.com/questions/561255/in-math-mode-underline-adjacent-variables-except-with-space-between-underlines
%     see: https://tex.stackexchange.com/questions/649142/double-underline-notation-for-matrices-and-single-underline-notation-for-vectors

\renewcommand\vec[1]{%
  \mspace{2mu}%
  \underline{\mspace{-2mu}#1\mspace{-8mu}}%
  \mspace{2mu}%
}

% ~~~ shortcuts ~~~~~~~~~~~~~~~~~~~~~~~
\newcommand\ms[0]{\mathbb{S}}
\newcommand\fs[0]{f(\vec{\sigma)}}


\begin{document}

\begin{center}
%   \definecolor{qqwuqq}{rgb}{0,0.39215686274509803,0}
%   \definecolor{uuuuuu}{rgb}{0.26666666666666666,0.26666666666666666,0.26666666666666666}
%   \definecolor{qqqqff}{rgb}{0,0,1}
    
    \begin{tikzpicture}[
        line cap=round,
        line join=round,
        >=stealth,
        lbl/.style={draw,circle},
        lne/.style={line width=0.8pt},
        area/.style={lne, fill=teal!50},%,rounded corners},
        %   x=1cm,y=1cm
        ]
        % ~~~ for the axes ~~~~~~~~~~~~
        \coordinate[label=below left:] (A) at (0,0);
        \coordinate[label=below left:] (B) at (4,0);
        \coordinate[label=below left:] (C) at (0,3.35);
        
        % ~~~ for the area ~~~~~~~~~~~~~~~
        %     obsolete with my approach
%       \coordinate[label=below left:] (D) at (-3,1);
%       \coordinate[label=below left:] (E) at (-2,2);
%       \coordinate[label=below left:] (F) at (2.66,1.51);
%       \coordinate[label=below left:] (G) at (2.88,0.75);
%       \coordinate[label=below left:] (H) at (1.52,-1.35);
%       \coordinate[label=below left:] (I) at (-1.78,-0.91);
%       \coordinate[label=below left:] (J) at (-2.84,-0.09);
%       \coordinate[label=below left:] (K) at (-3.1,0.39);
        
        % ~~~ area ~~~~~~~~~~~~
        %     works with your data, but ...
%       \draw[area] (D) -- (E) -- (F) -- (G) -- (H) -- 
%                   (I) -- (J) -- (K) -- cycle;
        
        % ~~~ start simple ~~~~~~~~~~~~~~~~~~~~~~~
%       \draw[area] (-2,0) -- (.4,2) -- (2,0) -- (-.5,-1.5) -- cycle;
        
        % ~~~ next refine ~~~~~~~~~~~~~~~~~~~~~~~
        \draw[area] (-2,0)  to[out=90,in=180] (.4,2) to[out=0,in=90] (2,0)
                            to[out=-90,in=00] (-.5,-1.5) 
                            to[out=180,in=-90] cycle;
        
        % ~~~ axes ~~~~~~~~~~~~~~~~~~~
        \draw [->,lne] (A) -- (B) node[anchor=west] {$\sigma_{kl}$};        
        \draw [->,lne] (A) -- (C) node[anchor=south] {$\sigma_{ij}$};
    
        % ~~~ missing labels ~~~~~~~~~~~~~~~~~~~~
        \node at (.5, .5) {$\ms$};      
        \node at (.5,-.5) {$\fs \le 0$};        
        
        \node[align=center] at (1,2) {$\partial \mathbb{S}$\\$\fs = 0$};
    \end{tikzpicture}
  \end{center}
\end{document}

관련 정보