我想创建一个水波槽的插图,该槽的一端被蛇形(又称多元素)造波桨所包围。
这是蛇形造波器的外形
下面是显示造波器的代码 -
\documentclass[a4paper, 12pt]{article}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\begin{document}
\begin{figure}
\centering
\tdplotsetmaincoords{75}{-30}
\begin{tikzpicture}
[tdplot_main_coords,
tank/.style={very thick,black},
axis/.style={->,blue,thick},
wmkedge/.style={thick,black},
wmksurf/.style={red, opacity=.5},]
%draw the axes
\draw[axis] (0,0,3) -- (12,0,3) node[anchor=west]{$x$};
\draw[axis] (0,0,3) -- (0,6,3) node[anchor=west]{$y$};
\draw[axis] (0,0,3) -- (0,0,5) node[anchor=west]{$z$};
%draw the top and bottom of the tank
\draw[tank] (0,0,0) -- (10,0,0) -- (10,5,0) -- (0,5,0) -- cycle;
\draw[tank] (0,0,3) -- (10,0,3) -- (10,5,3) -- (0,5,3) -- cycle;
%draw the edges of the tank
\draw[tank] (0,0,0) -- (0,0,3);
\draw[tank] (0,5,0) -- (0,5,3);
\draw[tank] (10,0,0) -- (10,0,3);
\draw[tank] (10,5,0) -- (10,5,3);
%draw edges of wavemaker
\draw[wmkedge] (0,0,1) -- (0.5,0,2.8);
\draw[wmkedge] (0,5,1) -- (-0.5,5,2.8);
\draw[wmkedge] (0,0,1) -- (0,5,1);
\draw[wmkedge] (0.5,0,2.8) .. controls (-0.25,1.7,2.8) and (0.25,3.5,2.8) .. (-0.5,5,2.8);
%draw wave maker surface
\fill[wmksurf] (0,0,1) --(0.5,0,2.8) .. controls (-0.25,1.7,2.8) and (0.25,3.5,2.8) .. (-0.5,5,2.8) -- (0,5,1) --cycle;
%
\end{tikzpicture}
\end{figure}
\end{document}
现在我想在其中添加波浪形自由水面。自由水面由水箱一侧的造波器界定,然后由水箱远端和侧面的壁界定。
我不希望自由表面穿透造波器。
也就是说,自由表面的斑块图以水平面和油箱边界相交所创建的曲线为界。