
eu tenho essa imagem...
Quero replicar isso em LaTeX, mas também ter dimensões em uma das janelas. Algo assim...
Como eu poderia fazer isso usando o TiKZ e ao mesmo tempo manter a sensação e a forma de uma aeronave real, como na imagem, e também adicionar as dimensões?
A pergunta 'Desenhe uma aeronave com Tikz' não responde a esta pergunta.
Responder1
É muito fácil desenhar essas coisas, simplesmente tedioso. Para o futuro, peço a gentileza de fornecer algum código que pelo menos defina as cores, defina algumas dimensões e assim por diante, para que outros não tenham que começar do zero.
\documentclass[tikz,border=3mm]{standalone}
\definecolor{wt}{RGB}{210,215,219} % frame top
\definecolor{wb}{RGB}{151,154,162} % frame bottom
\definecolor{w}{RGB}{49,66,89} % window
\definecolor{pt}{RGB}{242,242,242} % plane top
\definecolor{pb}{RGB}{208,209,213} % plane bottom
\definecolor{wf}{RGB}{85,96,110} % inner frame
\definecolor{blind}{RGB}{115,119,128} % blind
\begin{document}
\begin{tikzpicture}[>=latex,pics/fuselage/.style={code={
\tikzset{fuselage/.cd,#1}%
\def\pv##1{\pgfkeysvalueof{/tikz/fuselage/##1}}%
\fill[w,rounded corners=\pv{r}-\pv{d}]
(-\pv{w}/2+\pv{d},-\pv{h}/2+\pv{d}) rectangle (\pv{w}/2-\pv{d},\pv{h}/2-\pv{d});
\clip [rounded corners=\pv{r}]
(-\pv{w}/2,-\pv{h}/2) rectangle (\pv{w}/2,\pv{h}/2);
\fill[blind] (-\pv{w}/2,\pv{h}/2-\pv{b}) rectangle (\pv{w}/2,\pv{h}/2);
\fill[wf,xshift=1.3pt,yshift=-1.3pt,even odd rule]
[rounded corners=\pv{r}]
(-\pv{w}/2,-\pv{h}/2) rectangle (\pv{w}/2,\pv{h}/2)
[rounded corners=\pv{r}-\pv{d}]
(-\pv{w}/2+\pv{d},-\pv{h}/2+\pv{d}) rectangle (\pv{w}/2-\pv{d},\pv{h}/2-\pv{d});
\draw[top color=wt,bottom color=wb,even odd rule]
[rounded corners=\pv{r}]
(-\pv{w}/2,-\pv{h}/2) rectangle (\pv{w}/2,\pv{h}/2)
[rounded corners=\pv{r}-\pv{d}]
(-\pv{w}/2+\pv{d},-\pv{h}/2+\pv{d}) rectangle (\pv{w}/2-\pv{d},\pv{h}/2-\pv{d});
}},fuselage/.cd,h/.initial=1.4cm,w/.initial=1cm,
d/.initial=0.7mm,r/.initial=4mm,b/.initial=2mm]
\path[top color=pt,bottom color=pb] (-4,-3) rectangle (4,3);
\path foreach \X in {0,...,3} {(-3+2*\X,0.5) pic{fuselage}};
\draw[|<->|] (1-0.425,0.5) -- (1+0.425,0.5) node[pos=0.75,above]{$a$};
\draw[|<->|] (1,0.5-0.625) -- (1,0.5+0.625) node[pos=0.75,left]{$b$};
\end{tikzpicture}
\end{document}
TERMO ADITIVO: Por solicitação uma versão com passageiros. (Estes não são necessariamente animais, entre os TikZlings, há um boneco de neve e três seres.)
\documentclass[tikz,border=3mm]{standalone}
\usepackage{tikzlings}
\definecolor{wt}{RGB}{210,215,219} % frame top
\definecolor{wb}{RGB}{151,154,162} % frame bottom
\definecolor{w}{RGB}{49,66,89} % window
\definecolor{pt}{RGB}{242,242,242} % plane top
\definecolor{pb}{RGB}{208,209,213} % plane bottom
\definecolor{wf}{RGB}{85,96,110} % inner frame
\definecolor{blind}{RGB}{115,119,128} % blind
\begin{document}
\begin{tikzpicture}[>=latex,pics/fuselage/.style={code={
\tikzset{fuselage/.cd,#1}%
\def\pv##1{\pgfkeysvalueof{/tikz/fuselage/##1}}%
\fill[w,rounded corners=\pv{r}-\pv{d}]
(-\pv{w}/2+\pv{d},-\pv{h}/2+\pv{d}) rectangle (\pv{w}/2-\pv{d},\pv{h}/2-\pv{d});
\clip [rounded corners=\pv{r}]
(-\pv{w}/2,-\pv{h}/2) rectangle (\pv{w}/2,\pv{h}/2);
\fill[blind] (-\pv{w}/2,\pv{h}/2-\pv{b}) rectangle (\pv{w}/2,\pv{h}/2);
\tikzling[scale=0.6,yshift=-2cm]
\fill[wf,xshift=1.3pt,yshift=-1.3pt,even odd rule]
[rounded corners=\pv{r}]
(-\pv{w}/2,-\pv{h}/2) rectangle (\pv{w}/2,\pv{h}/2)
[rounded corners=\pv{r}-\pv{d}]
(-\pv{w}/2+\pv{d},-\pv{h}/2+\pv{d}) rectangle (\pv{w}/2-\pv{d},\pv{h}/2-\pv{d});
\draw[top color=wt,bottom color=wb,even odd rule]
[rounded corners=\pv{r}]
(-\pv{w}/2,-\pv{h}/2) rectangle (\pv{w}/2,\pv{h}/2)
[rounded corners=\pv{r}-\pv{d}]
(-\pv{w}/2+\pv{d},-\pv{h}/2+\pv{d}) rectangle (\pv{w}/2-\pv{d},\pv{h}/2-\pv{d});
}},fuselage/.cd,h/.initial=1.4cm,w/.initial=1cm,
d/.initial=0.7mm,r/.initial=4mm,b/.initial=3mm]
\path[top color=pt,bottom color=pb] (-4,-3) rectangle (4,3);
\path foreach \X in {0,...,3} {(-3+2*\X,0.5) pic{fuselage}};
\end{tikzpicture}
\end{document}
Estes são Ti escolhidos aleatoriamentekZlings, em cada compilação você receberá um conjunto aleatório. Se você não gosta dessa aleatoriedade, use \pgfmathsetseed{<int>}
where int
é um número inteiro.