答案1
请注意,我认为我不应该回答像这样的“为我做一切”的问题。另外,请注意,在这种情况下,我不太可能对后续行动做出回应,除非你的后续行动恰好吸引了我。如果您需要任何调整,我建议您添加以下一项或多项:
- 一只或多只猫,坐着或躺着;
- 一个或多个大锅;
- 一辆或多辆有轨电车或单层巴士。
\documentclass[tikz,border=10pt]{standalone}
\begin{document}
\begin{tikzpicture}
\draw (0,0) coordinate (a) [bend right=15] to +(2,0) coordinate (b) [bend right] to +(0,-1) coordinate (c) [bend right] to (a |- c) [bend right=15] to cycle ;
\begin{scope}
\clip (3,0) coordinate (A) +(.1,0) coordinate (A1) -- +(1.9,0) coordinate (B1) arc (180:270:.1) coordinate (B2) -- +(0,-.8) coordinate (C1) arc (90:190:.1) coordinate (C2) -- (C2 -| A1) arc (0:90:.1) -- (B2 -| A) arc (270:360:.1) ;
\draw (A) coordinate (a') [bend right=15] to +(2,0) coordinate (b') [bend right] to +(0,-1) coordinate (c') [bend right] to (a' |- c') [bend right=15] to cycle ;
\end{scope}
\clip (a') [bend right=15] to (b') [bend right] to (c') [bend right] to (a' |- c') [bend right=15] to cycle ;
\draw (B1) arc (180:270:.1) (C1) arc (90:190:.1) (C2 -| A1) arc (0:90:.1) (B2 -| A) arc (270:360:.1) ;
\end{tikzpicture}
\end{document}
答案2
不幸的是,这不是一个完整的答案,但我需要一个非常相似的形状:一个带有倒角但没有凸边的矩形。我做了一个形状(见此处:myshape.tex),其中可以选择要反转的角:
测试脚本相当小:
\RequirePackage{luatex85}
\documentclass[tikz,convert=false]{standalone}
\tikzset{
shape example/.style={
color=black!30,
draw,
fill=yellow!30,
line width=.5cm,
},
}
\input{myshape}
\begin{document}
\begin{tikzpicture}\Huge
\node[rectangle with inverted corners, rectangle with inverted corners radius=20pt,
rectangle with inverted corners selected={north west, north east},
shape example, minimum height=6cm, inner ysep=1cm, inner xsep=.75cm] (s)
{Rectangle with inverted corners\vrule width1pt height2cm};
\foreach \anchor/\placement in
{text/below, center/above, 70/above,
base/below, base east/below, base west/below,
mid/above, mid east/above, mid west/above,
north/below, south/above, east/above, west/above,
before north east/above, north east/below, after north east/above,
before north west/above, north west/below, after north west/above,
before south west/above, south west/above, after south west/below,
before south east/below, south east/above, after south east/above}
\draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)}
node[\placement=0mm] {\scriptsize\texttt{(s.\anchor)}};
\end{tikzpicture}
\end{document}
'''