待製作圖

待製作圖

我需要準確地重現這個數字,但我沒有得到相同的結果。

在此輸入影像描述

\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}才能顯示它們
  • 對於初學者來說,為 sigma 添加雙下劃線是很困難的;查看評論中的兩個連結;我的是基於這些的近似值

結果

\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}

相關內容