所以我想在垂直三角形中有几个垂直曲线,比如
我尝试了几种方法,但简单的三点弧线跨越了三角形的边界。绘制正弦(这仍然不是我想要的)似乎无法通过定位,唯一真正有效的旋转图形的选项是以下代码:
\documentclass[border=3.14pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\coordinate (O1) at (-1,0);
\coordinate (A1) at (-1,4);
\coordinate (O2) at (1,0);
\coordinate (A2) at (1,4);
\coordinate (O3) at (-1,0);
\coordinate (A3) at (1,0);
\coordinate (O4) at (-1,4);
\coordinate (A4) at (1,4);
\path[every node/.style={font=\sffamily\small}]
(O1) edge[] (A1);
\path[every node/.style={font=\sffamily\small}]
(O2) edge[] (A2);
\path[every node/.style={font=\sffamily\small}]
(O3) edge[] (A3);
\path[every node/.style={font=\sffamily\small}]
(O4) edge[] (A4);
\path[every node/.style={font=\sffamily\small}]
(-1,0) edge[] (1,2);
(-1,4) edge[] (1,6);
\path[every node/.style={font=\sffamily\small}]
(1,2) edge[] (-1,4);
(1,6) edge[] (-1,8);
\begin{scope}[rotate=-90]
\draw[dashed] (0,0) plot[domain=0:3.14159265,smooth, variable = \y] (\y,
{sin(\y r)});
\end{scope}
\end{tikzpicture}
\end{document}
这样就生成了第二张图片。(很抱歉这篇文章的格式不对,我真的不知道如何处理这么长的图片)。
答案1
像这样?
使用纯 TikZ 代码:
\documentclass[tikz, border=3.14pt]{standalone}
\begin{document}
\begin{tikzpicture}[
box/.style = {draw, minimum width=2cm, minimum height=4cm,
inner sep=0pt, node contents={}}
]
%
\node (n) [box];
\draw (n.south east) -- (n.west) -- (n.north east);
\draw[dashed,thin]
(n.south east) to [bend left=45,looseness=1.50] (n.north east)
(n.south east) to [bend left=30,looseness=1.25] (n.north east)
(n.south east) to [bend left=15] (n.north east);
\node [above] at (n.south) {$r=0$};
\node [below] at (n.north) {$r=0$};
\end{tikzpicture}
\end{document}
答案2
怎么样
\documentclass[tikz,border=3.14pt]{standalone}
\begin{document}
\begin{tikzpicture}
\node[draw,minimum width=2cm,minimum height=4cm] (graph){};
\draw (graph.north east) -- (graph.west) node[pos=0.3,left]{$r=0$}
-- (graph.south east) node[pos=0.7,left]{$r=0$};
\draw[dashed] foreach \X in {1,2,3}
{(graph.south east) to[out=90+\X*45/4,in=-90-\X*45/4,looseness=1.7] (graph.north east)};
\end{tikzpicture}
\end{document}