I'm trying to draw an airplane. When I was drawing the window for the cockpit, I was using projected points to get right angles. But things aren't working out as expected. Could anyone give me a pointer about what I'm doing incorrectly?
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\pagestyle{empty}
\begin{document}
\def\aeBodyRadius{0.25cm}
\def\aeBodyNoseDistance{0.21cm}
\begin{tikzpicture}[x=5cm,y=5cm,scale=3,every node={transform shape}]
\coordinate (TAIL) at (0,0);
\coordinate (NOSE) at ($(TAIL)+(30:1)$);
\coordinate (MID) at ($(TAIL)!0.75!(NOSE)$);
\coordinate (MID/TOP) at ($(MID)!\aeBodyRadius!90:(NOSE)$);
\coordinate (MID/BOT) at ($(MID)!\aeBodyRadius!-90:(NOSE)$);
\coordinate (NOSE/TIP) at ($(NOSE)!\aeBodyNoseDistance!90:(MID)$);
\coordinate (HIND/TOP) at ($(TAIL)!\aeBodyRadius!90:(NOSE)$);
\coordinate (HIND/BOT) at ($(TAIL)!\aeBodyRadius!-90:(NOSE)$);
\node[fill,circle,inner sep=1pt] at (MID/TOP) {};
\node[fill,circle,inner sep=1pt] at (MID/BOT) {};
\node[fill,circle,inner sep=1pt] at (HIND/TOP) {};
\node[fill,circle,inner sep=1pt] at (HIND/BOT) {};
\draw[rounded corners=10pt]
(HIND/TOP) --
(MID/TOP) --
node [pos=0.25] (WINDOW/TOP/N) {}
node [pos=0.50] (WINDOW/BOT/N) {}
(NOSE/TIP) --
(MID/BOT) --
(HIND/BOT);
\coordinate (WINDOW/TOP) at (WINDOW/TOP/N.center);
\coordinate (WINDOW/BOT) at (WINDOW/BOT/N.center);
\coordinate (WINDOW/RIG/T) at ($(TAIL)!(WINDOW/TOP)!(NOSE)$);
\coordinate (WINDOW/RIG) at ($(WINDOW/TOP)!(WINDOW/BOT)!(WINDOW/RIG/T)$);
\draw (WINDOW/TOP) -- (WINDOW/RIG) -- (WINDOW/BOT);
\draw[red] (TAIL) -- (NOSE);
\end{tikzpicture}
\end{document}

The "red" line runs down the center of the plane clearly shows how my perpendicular is not what it should be.
UPDATE
What seems not to be working is the following snippet of code:
\coordinate (WINDOW/RIG/T) at ($(TAIL)!(WINDOW/TOP)!(NOSE)$);
\coordinate (WINDOW/RIG) at ($(WINDOW/TOP)!(WINDOW/BOT)!(WINDOW/RIG/T)$);
The projected points do not seem to lie on the appropriate perpendicular. In particular,
(WINDOW/RIG) should lie above the red line since the line through (WINDOW/TOP) and (WINDOW/RIG/T) should be perpendicular to the red line through (TAIL) and (NOSE).



NOSEandTAILand everything seems relative to those two points. Not sure where you expected the red line to be? – Peter Grill Mar 27 '14 at 22:42