Projected coordinate in TikZ is not properly placed

You probably intended to put WINDOW/RIG/T along the main axis, but this worked. (If it aint broke...)

vvvooooom!

\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);

%start of modifications
   \coordinate (WINDOW/RIG/T) at ($(TAIL)!(WINDOW/TOP)!90:(NOSE)$);
   \coordinate (WINDOW/RIG)   at ($(WINDOW/TOP)!(WINDOW/BOT)!90:(WINDOW/RIG/T)$);
   \node[fill,circle,inner sep=1pt] at (WINDOW/RIG/T) {};% way down near the tail
   \draw[blue] (WINDOW/TOP) -- (WINDOW/RIG) -- (WINDOW/BOT);
%end of modifications

   \draw[red] (TAIL) -- (NOSE);

\end{tikzpicture}

\end{document}

As mentioned by A.Ellett, the error is caused by \pgfpointnormalised. A solution to obtain a better precision is given in this answer.

Applied on the MWE:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\pagestyle{empty}

% use the Mark Wibrow's correction
\makeatletter
\def\pgfpointnormalised#1{%
\pgf@process{#1}%
\pgfmathatantwo{\the\pgf@y}{\the\pgf@x}%
\let\pgf@tmp=\pgfmathresult%
\pgfmathcos@{\pgf@tmp}\pgf@x=\pgfmathresult pt\relax%
\pgfmathsin@{\pgf@tmp}\pgf@y=\pgfmathresult pt\relax%
}
\makeatother

\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}

enter image description here

Tags:

Tikz Pgf