Tikz:如何构造这些线条

Tikz:如何构造这些线条

我有一个通过这种方式构建的图像:

\usepackage{tkz-euclide}
\usetikzlibrary{intersections,arrows.meta}
\usetkzobj{all}
\usetikzlibrary{patterns}
\pgfdeclarepatternformonly{my north east lines}{\pgfqpoint{-1pt}{-1pt}}{%
\pgfqpoint{8pt}{8pt}}{\pgfqpoint{7pt}{7pt}}%
{
  \pgfsetlinewidth{0.4pt}
  \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
  \pgfpathlineto{\pgfqpoint{7.1pt}{7.1pt}}
  \pgfusepath{stroke}
}        

\begin{figure}[t!]
    \centering
    %--------------------------
    \begin{tikzpicture}[>= {Stealth[scale=2.2,inset=0pt,angle'=20]}]  
      %Definindo os vertices
      %Chao2
      \tkzDefPoint (0,0){A}
      \tkzDefPoint (6,2.25){B}
      %Eixo horizontal
      \tkzDefPoint (0,0){C}
      \tkzDefPoint (6,0){D}
      %Eixo y
      \coordinate (E) at ($ (B)!1!(A) $);
          \coordinate (F) at ($ (E)!3.2cm!90:(B) $);
          \draw[->] (E) -- (F);
          %Chao1
          \coordinate (G) at ($ (E)!0.86!(F) $);
          \coordinate (H) at ($ (G)!6cm!90:(E) $);
          \draw (G) -- (H);
          %Linha interface
          \coordinate (I) at ($ (E)!0.35!(F) $);
          \coordinate (J) at ($ (I)!6cm!90:(E) $);
          \draw[dashed] (I) -- (J);
      %Desenhando as retas/setas
      \draw (A) -- (B); 
      \draw[dashed] (C) -- (D);
      %Arco ângulo e legenda
      \tkzDrawArc[R with nodes, color=black](A,1cm)(D,B)
      \tkzLabelAngle[pos = 1.25](D,A,B){$\theta$}
    \end{tikzpicture}
      \end{figure}

结果:

enter image description here

我怎样才能绘制如下图所示的线条:

enter image description here

答案1

假设你想使用你的模式来实现这一点,你可以这样做

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{tkz-euclide}
\usetikzlibrary{intersections,arrows.meta}
\usetkzobj{all}
\usetikzlibrary{patterns}
\pgfdeclarepatternformonly{my north east lines}{\pgfqpoint{-1pt}{-1pt}}{%
\pgfqpoint{8pt}{8pt}}{\pgfqpoint{7pt}{7pt}}%
{
  \pgfsetlinewidth{0.4pt}
  \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
  \pgfpathlineto{\pgfqpoint{7.1pt}{7.1pt}}
  \pgfusepath{stroke}
}

\begin{document}
    \centering
    %--------------------------
    \begin{tikzpicture}[>= {Stealth[scale=2.2,inset=0pt,angle'=20]}]  
      %Definindo os vertices
      %Chao2
      \tkzDefPoint (0,0){A}
      \tkzDefPoint (6,2.25){B}
      %Eixo horizontal
      \tkzDefPoint (0,0){C}
      \tkzDefPoint (6,0){D}
      %Eixo y
      \coordinate (E) at ($ (B)!1!(A) $);
          \coordinate (F) at ($ (E)!3.2cm!90:(B) $);
          \draw[->] (E) -- (F);
          %Chao1
          \coordinate (G) at ($ (E)!0.86!(F) $);
          \coordinate (H) at ($ (G)!6cm!90:(E) $);
          \draw (G) -- (H);
          \path[pattern=my north east lines] (G) -- (H) -- ($(H)!4mm!270:(G)$)
          --($(G)!4mm!90:(H)$) -- cycle;
          %Linha interface
          \coordinate (I) at ($ (E)!0.35!(F) $);
          \coordinate (J) at ($ (I)!6cm!90:(E) $);
          \draw[dashed] (I) -- (J);
      %Desenhando as retas/setas
      \draw (A) -- (B); 
      \coordinate (A') at ($(A)!0.25!(B)$);
      \path[pattern=my north east lines] (A') -- (B) -- ($(B)!4mm!90:(A)$)
          --($(A')!4mm!270:(B)$) -- cycle;
      \draw[dashed] (C) -- (D);
      %Arco ângulo e legenda
      \tkzDrawArc[R with nodes, color=black](A,1cm)(D,B)
      \tkzLabelAngle[pos = 1.25](D,A,B){$\theta$}
    \end{tikzpicture}
\end{document}

enter image description here

相关内容