[Tex/LaTex] TikZ Can I draw an arrow by specifying the initial point, direction, and length

drawtikz-pgf

I would like to draw something similar to this:

I was able to draw the triangles, but I cannot figure out how to easily draw the arrows. This is my attempt:

\documentclass[12pt]{book}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{amsmath}

\begin{document}

\begin{tikzpicture}
\draw (-6, -3) -- (6, -3)  -- (-2, 3) -- cycle; % Left - Right - Top
\draw (-4,0) -- (2, 0); % Horizontal Bisector
\draw (0, -3) -- (-4,0); % Left Bisector
\draw(0,-3) -- (2,0); % Right Bisector
\draw [->] (0.5, 0.825) -- (-0.5, 1.575); % slope -3/4
\end{tikzpicture}

\end{document}

Which looks like this:

Calculating the length, direction, and position of each arrow would take me hours. Is there a way to specify an arrow by giving the initial point, length, and direction? If not, is there a different way to do this diagram? I am a beginner at TikZ (and LaTeX in general) so I am not necesarily looking so much for the absolute shortest solution, but more for a solution that I can understand. Thanks.

Best Answer

Here is a version that modifies the to path. So you need to replace -- by to, and to apply the style, e.g.

\draw[pft] (-6, -3) to (0, -3) to (-4,0) to cycle;

The to path is modified in such a way that a sloped arrow (from the shapes.arrows library) is attached in the middle of the path. allow upside down is used to avoid that TikZ intelligently rotates the arrows in a way that is appropriate for texts. I also would use symbolic coordinates, and the nodes can be placed in the centers of the triangles with barycentric cs:.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{shapes.arrows}
\begin{document}

\begin{tikzpicture}[pft/.style={to path={--(\tikztotarget)
    node[midway,above=0.6em,marrow,allow upside down]{}}},
    marrow/.style={sloped,fill, minimum height=3cm, single arrow, single arrow
    head extend=.5cm, single arrow head indent=.25cm,xscale=0.3,yscale=0.15}]
 \path (-6, -3) coordinate (A)  (6, -3) coordinate (B) (-2, 3) coordinate (C)
  (A) -- (B) coordinate[midway] (AB) (B) -- (C) coordinate[midway] (BC)         
  (C) -- (A) coordinate[midway] (CA);   
 \draw[pft] (A) to (AB) to (CA) to cycle
    (AB) to (B) to (BC) to cycle
    (CA) to (BC) to (C) to cycle
    (CA) to (AB) to (BC) to cycle;
 \path (barycentric cs:A=1,AB=1,CA=1) node{$T_1^{(1)}$}
  (barycentric cs:AB=1,BC=1,CA=1) node{$T_2^{(1)}$}
  (barycentric cs:CA=1,BC=1,C=1) node{$T_3^{(1)}$}
 (barycentric cs:B=1,AB=1,BC=1) node{$T_4^{(1)}$};
\end{tikzpicture}
\end{document}

enter image description here