如何使用乳胶绘制几何图形?

如何使用乳胶绘制几何图形?

我想用 Latex 绘制下图在此处输入图片描述

我不确定应该使用哪些软件包。任何指向解决方案的指示都会很有帮助

答案1

我实际上会推荐tikz-3dplot这一点。

\documentclass[tikz,border=3.14mm]{standalone} 
\usepackage{tikz-3dplot} 
\usetikzlibrary{3d} 
\begin{document} 
\tdplotsetmaincoords{60}{30} 
\begin{tikzpicture}[tdplot_main_coords] 
 \draw[thick] (-2,0,0) -- (4,0,0) node[pos=-0.1]{$C_1$};
 \draw[thick] (0,-2,0) -- (0,4,0) node[pos=-0.1]{$C_2$};
 \begin{scope}[canvas is yz plane at x=1,rotate=20]
  \draw (0,0) -- (2,0) -- (0,-1) -- (2,-1) -- (0,0) -- (0,-1) -- (-2,-1);
  \draw[dashed] (2,-1) -- (2,1) -- (-2,-1);
 \end{scope}
\end{tikzpicture}
\end{document}

在此处输入图片描述

这使您可以使用 3D 坐标并随意更改视图。

\documentclass[tikz,border=3.14mm]{standalone} 
\usepackage{tikz-3dplot} 
\usetikzlibrary{3d} 
\begin{document} 
\foreach \X in {5,15,...,355}
{\tdplotsetmaincoords{60+10*sin(\X)}{\X} 
\begin{tikzpicture}[tdplot_main_coords]
 \path[use as bounding box] [tdplot_screen_coords] (-4,-3) rectangle (4,3);
 \draw[thick] (-2,0,0) -- (4,0,0) node[pos=-0.1]{$C_1$};
 \draw[thick] (0,-2,0) -- (0,4,0) node[pos=-0.1]{$C_2$};
 \begin{scope}[canvas is yz plane at x=1,rotate=20]
  \draw (0,0) -- (2,0) -- (0,-1) -- (2,-1) -- (0,0) -- (0,-1) -- (-2,-1);
  \draw[dashed] (2,-1) -- (2,1) -- (-2,-1);
 \end{scope}
\end{tikzpicture}}
\end{document}

在此处输入图片描述

答案2

添加文字是为了你好,因为我的眼睛看不清楚。

\documentclass{standalone}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}[scale=.5]
\coordinate (o) at (0,0);
\draw (-4,-2) coordinate (s1)--(6,3) coordinate (e1) (-4,2) coordinate (s2)--(6,-3) coordinate (e2);
\coordinate (a) at (-.5,-6);
\tkzDefPointBy[reflection=over s2--e2](a) \tkzGetPoint{b}
%\tkzDefPointBy[reflection=over s1--e1](b) \tkzGetPoint{c}: this cause great whitespace, I don't know why
\coordinate (c) at (5.9,1.2);
\draw[dashed] (a)--(b)--(c);
\draw (c)--(a);
\path (2,-1) coordinate (hab);
\path ($(a)!(hab)!(c)$) coordinate (hac);
\path ($(b)!(o)!(c)$) coordinate (hbc);
\draw (hab)--(hac)--(hbc)--cycle (hab)--(c);
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容