如何在弯曲空间中绘制切线坐标系

如何在弯曲空间中绘制切线坐标系

我需要用 TikZ 绘制所附图像在此处输入图片描述

我的 MWE 如下:

\documentclass{beamer}
\usepackage{mathtools,tikz,lmodern, xparse}
\usetikzlibrary{%arrows, chains, matrix, 
            positioning, 
            %shadows,
            shapes, shapes.callouts,
            %shapes.geometric,
            %shapes.misc
            }


\usepackage{amsmath} %For align environement
\usepackage{color}% to define the next colors
\definecolor{airforceblue}{rgb}{0.36, 0.54, 0.66}
\definecolor{alizarin}{rgb}{0.82, 0.1, 0.26}
\definecolor{white}{rgb}{1.0, 1.0, 1.0}
\definecolor{blue(munsell)}{rgb}{0.0, 0.5, 0.69}

  \begin{document}

  \begin{frame}{}
  \begin{tikzpicture}
 \draw (-3,0) -- (3,0) ;
 \draw (0,-3) -- (0,3) ;
 \draw[step=0.5cm] (-2.4,-2.4) grid (2.4,2.4) ;
 \draw [rectangle,fill=gray!10](-0.07,-0.35) -- (0.5, 0.3)-- (0.1, 0.4) -- (-0.46,-0.26)--(-0.07,-0.35); 
 \draw [->,thick,color=red](0,0) -- (xyz cs:x=1) ; 
 \node [red, above] at (0,1) {$e_1$};  
 \draw [->,thick,color=red](0,0) -- (xyz cs:y=1) ;
 \node [red, right] at (1,0) {$e_2$};
 \draw [->,thick,color=red](0,0) -- (xyz cs:z=1.5) ; 
 \node [red, above] at (-0.7,-1) {$e_3$};    
 \draw (-2,-1.8)..controls (-1.5,-0.6)..(0.5,-1.6);
 \draw (0.5,-1.6)..controls (1.0,-1.8) and (1,-2)..(2,-1);%and (5,-1.6)

 \draw (-1.95,-1.3)..controls (-1.35,-0.12)..(0.35,-1.11); %(-0.15,-0.5)
 \draw (0.35,-1.11)..controls (0.85,-1.3) and (0.85,-2)..(2,-0.5);

\draw (-1.90,-0.8)..controls (-1.20,-0.07)..(0.20,-0.61);
\draw (0.2,-0.61)..controls (0.7,-0.80) and (0.70,-1.5)..(1.85,-0.0);
\end{tikzpicture}

   \end{frame}
   \end{document}

编辑一:我更新了代码,现在它包含曲线

编辑二:我使用以下代码绘制了它:

\documentclass{beamer}
\usepackage{mathtools,tikz,lmodern, xparse}
\usetikzlibrary{%arrows, chains, matrix, 
        positioning, graphs,
        %shadows,
        shapes, shapes.callouts,
        %shapes.geometric,
        %shapes.misc
        }
\usepackage{amsmath} %For align environement
\usepackage{color}% to define the next colors


\newcommand{\Varrow}[3]{\begin{tikzpicture}[remember picture,overlay, ->, L/.style = {draw, #1}]
 \draw%[]
(#2) edge[L] (#3); 
 \end{tikzpicture}       } 


\begin{document}

\begin{frame}{Vierbein}
\begin{tikzpicture}[remember picture]
 \draw [rectangle,fill=gray!100,rotate=-45,xshift=-0.7cm,yshift=-0.7cm](-0.13,-0.3) rectangle (0.13,0.3)
    node[](nodeA) at (-0.16cm,0.2cm){};
     \node[black](nodeB) at (0.7cm,0.5cm) {\tiny{tangent space}};
     \Varrow{black}{nodeA}{nodeB};
 \draw [->,thick,color=red,xshift=-1cm](0,0) -- (xyz cs:x=0.3) ; 
 \node [red, above, xshift=-1cm,yshift=-0.6cm] at (0,1) {\tiny{$e_1$}};  
 \draw [->,thick,color=red, xshift=-1cm](0,0) -- (xyz cs:y=0.5) ;
 \node [red, right, xshift=-1.8cm] at (1,0) {\tiny{$e_2$}};
 \draw [->,thick,color=red, xshift=-1cm](0,0) -- (xyz cs:z=1.0) ; 
 \node [red, above, xshift=-0.67cm,yshift=0.3cm] at (-0.7,-1) {\tiny{$e_3$}};    
 %horizantal
   \foreach \y in {0.6, 0.9, 1.2, 1.5}
   \draw[xshift=0.2cm , yshift=\y cm, gray] (-2,-1.8)..controls (-1.5,-0.6)..(0.5,-1.6)
                               (0.5,-1.6)..controls (1.0,-1.8) and (1,-2)..(2,-1);
     \draw[xshift=0.2cm , yshift=0.1cm, gray] (-2,-1.8)..controls (-1.5,-0.6)..(0.5,-1.6)
                               (0.5,-1.6)..controls (1.0,-1.8) and (1,-2)..(2,-1);
      %vertical                                                 
     \draw[xshift=0.1 cm , yshift=-0.0cm, gray]     (-1.9,-1.1)..controls (-1.8,-0.1)..(-1.3,0.8);                                
     \draw[xshift=0.24 cm , yshift=-0.0cm,gray]     (-1.9,-1.1)..controls (-1.8,-0.1)..(-1.3,0.8);                           
    \draw[xshift=0.4 cm , yshift=-0.0cm, gray]     (-1.9,-1.1)..controls (-1.8,0)..(-1.3,0.8);                                               
    \foreach \x in { 0.4, 0.7, 1.0, 1.3}             
    \draw[xshift=\x cm , yshift=-0.0cm, gray]     (-1.9,-1.1)..controls (-1.8,0)..(-1.3,0.8);
   \foreach \x in { 1.6, 1.9}             
    \draw[xshift=\x cm , yshift=-0.3cm,gray]     (-1.9,-0.9)..controls (-1.8,0.1)..(-1.3,0.6);
     \foreach \x in { 2.2, 2.5}             
   \draw[xshift=\x cm , yshift=-0.3cm, gray]     (-1.9,-1.1)..controls (-1.8,0)..(-1.3,0.4);
  \end{tikzpicture}
 \end{frame}

 \end{document}

答案1

我改变了一些颜色,因为我认为它们在图像中是可以辨认的。

\documentclass{beamer}
\usepackage{mathtools,tikz,lmodern, xparse}
\usetikzlibrary{%arrows, chains, matrix, 
        positioning, graphs,
        %shadows,
        shapes, shapes.callouts,
        %shapes.geometric,
        %shapes.misc
        }
\usepackage{amsmath} %For align environement
\usepackage{color}% to define the next colors
\definecolor{bananayellow}{rgb}{1.0, 0.88, 0.21}
\definecolor{citrine}{rgb}{0.89, 0.82, 0.04}
\definecolor{darktangerine}{rgb}{1.0, 0.66, 0.07}

\newcommand{\Varrow}[3]{\begin{tikzpicture}[remember picture,overlay, ->, L/.style = {draw, #1}]
 \draw%[]
(#2) edge[L] (#3); 
 \end{tikzpicture}       } 


\begin{document}

\begin{frame}{Vierbein}
\begin{tikzpicture}[remember picture]   
 %horizantal
   \foreach \y in {0.6, 0.9, 1.2, 1.5}
   \draw[xshift=0.2cm , yshift=\y cm, gray] (-2,-1.8)..controls (-1.5,-0.6)..(0.5,-1.6)
                               (0.5,-1.6)..controls (1.0,-1.8) and (1,-2)..(2,-1);
     \draw[xshift=0.2cm , yshift=0.1cm, gray] (-2,-1.8)..controls (-1.5,-0.6)..(0.5,-1.6)
                               (0.5,-1.6)..controls (1.0,-1.8) and (1,-2)..(2,-1);
      %vertical                                                 
     \draw[xshift=0.1 cm , yshift=-0.0cm, gray]     (-1.9,-1.1)..controls (-1.8,-0.1)..(-1.3,0.8);                                
     \draw[xshift=0.24 cm , yshift=-0.0cm,gray]     (-1.9,-1.1)..controls (-1.8,-0.1)..(-1.3,0.8);                           
    \draw[xshift=0.4 cm , yshift=-0.0cm, gray]     (-1.9,-1.1)..controls (-1.8,0)..(-1.3,0.8);                                               
    \foreach \x in { 0.4, 0.7, 1.0, 1.3}             
    \draw[xshift=\x cm , yshift=-0.0cm, gray]     (-1.9,-1.1)..controls (-1.8,0)..(-1.3,0.8);
   \foreach \x in { 1.6, 1.9}             
    \draw[xshift=\x cm , yshift=-0.3cm,gray]      (-1.9,-0.9)..controls (-1.8,0.1)..(-1.3,0.6);
     \foreach \x in { 2.2, 2.5}             
   \draw[xshift=\x cm , yshift=-0.3cm, gray]     (-1.9,-1.1)..controls (-1.8,0)..(-1.3,0.4);
       %rectangle
 \draw [rectangle,fill=gray!50,rotate=-20,xshift=-1.13cm,yshift=-0.16cm](-0.13,-0.3) rectangle (0.13,0.3);
  \node[](nodeA) at (-1.1cm,0.4cm){};
  \node[black](nodeB) at (0.7cm,0.5cm) {\tiny{tangent space}};
  %coord syst
 \draw [->,thick,color=red,xshift=-1.1cm,yshift=0.3cm,rotate=-15](0,0) -- (xyz cs:x=0.3) ; 
 \node [black, above, xshift=-1cm,yshift=-0.6cm] at (-0.2,1.3) {\tiny{$\mathbf{e_1}$}};  
 \draw [->,thick,color=red, xshift=-1.1cm,yshift=0.3cm,rotate=10](0,0) -- (xyz cs:y=0.5) ;
 \node [black, right, xshift=-1.8cm] at (0.9,0.2) {\tiny{$\mathbf{e_2}$}};
 \draw [->,thick,color=red, xshift=-1.1cm,yshift=0.3cm,rotate=23](0,0) -- (xyz cs:z=1.0) ; 
 \node [black, above, xshift=-0.67cm,yshift=0.3cm] at (-0.6,-0.87) {\tiny{$\mathbf{e_3}$}};     
   \end{tikzpicture}
   \Varrow{black}{nodeA}{nodeB}         
 \end{frame}

 \end{document}

给出以下图片:

在此处输入图片描述

相关内容