9

I wonder if it is possible to obtain exactly the following arrow tip with TikZ-PGF? I have searched all possible solutions in the PGF manual and in this site but only near ones are available. Here are some snapshots at different sizes and orientations:

enter image description here

enter image description here

enter image description here

The picture in the middle provides the most accurate shape.

I need the details. There are eight points that make up the convex hull of the arrow tip in my case in contrast to only four points in, e.g., stealth or three points in latex.

Here are the details needed (sure I exaggerate a bit to highlight the small details):

enter image description here

Any suggestions are very much appreciated.

  • Starting on page 1021 is a description of how to create your own arrow shape using \pgfdeclarearrow. So it is possible. – John Kormylo Oct 9 '14 at 2:41
  • 1
    What is the specification for being exactly the same? – percusse Oct 9 '14 at 7:50
  • That is to closely imitate the middle picture. You see if one smoothes the upper and lower envelopes it becomes like latex' and the base is more like stealth (pay attention to the ends of the base, they are beveled). I don't need these approximations as these tiny glyphs are the most beautiful attributes of it especially when printed on low resolution printers. – AboAmmar Oct 9 '14 at 8:21
  • You say to 'pay attention' to details and then say that you 'don't need these approximations'. Which approximations? – cfr Oct 9 '14 at 21:27
  • I explained in the updated post. – AboAmmar Oct 9 '14 at 22:13
7

Well, I managed to solve this. That was easy after I found the code for the built in stealth arrow tip. The idea is to, simply, add the extra points in my case which are points 3,4,6, and 7 to the original code for stealth. After adding the required points, some more tuning was required to get the desired shape as I was looking for.

Now here is the code I built for this:

\pgfarrowsdeclare{varstealth}{varstealth}
 {
  \pgfarrowsleftextend{-5.59\pgflinewidth}
  \pgfarrowsrightextend{4.5\pgflinewidth}}
 {
  \pgfpathmoveto{\pgfpoint{4.5\pgflinewidth}{0pt}} %Point5
  \pgfpathlineto{\pgfpoint{-0.63\pgflinewidth}{1.09\pgflinewidth}} %Point4
  \pgfpathlineto{\pgfpoint{-5.48\pgflinewidth}{3.06\pgflinewidth}} %Point3
  \pgfpathlineto{\pgfpoint{-5.59\pgflinewidth}{3.0\pgflinewidth}}%Point2
  \pgfpathlineto{\pgfpoint{-3.95\pgflinewidth}{0pt}} %Point1
  \pgfpathlineto{\pgfpoint{-5.59\pgflinewidth}{-3.0\pgflinewidth}}%Point8
  \pgfpathlineto{\pgfpoint{-5.48\pgflinewidth}{-3.06\pgflinewidth}}%Point7
  \pgfpathlineto{\pgfpoint{-0.63\pgflinewidth}{-1.09\pgflinewidth}}%Point6
  \pgfusepathqfill
 }

I have also experimented using it as in the following example (originally found here):

enter image description here

And here is the code also for this:

\documentclass[a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}
\usetikzlibrary{backgrounds} 
\begin{document}
\pgfarrowsdeclare{varstealth}{varstealth}% My new arrow tip declaration
 {
  \pgfarrowsleftextend{-5.58\pgflinewidth}
  \pgfarrowsrightextend{4.5\pgflinewidth}}
 {
  \pgfpathmoveto{\pgfpoint{4.5\pgflinewidth}{0pt}} %Point5
  \pgfpathlineto{\pgfpoint{-0.63\pgflinewidth}{1.09\pgflinewidth}} %Point4
  \pgfpathlineto{\pgfpoint{-5.48\pgflinewidth}{3.06\pgflinewidth}} %Point3
  \pgfpathlineto{\pgfpoint{-5.59\pgflinewidth}{3.0\pgflinewidth}}%Point2
  \pgfpathlineto{\pgfpoint{-3.95\pgflinewidth}{0pt}} %Point1
  \pgfpathlineto{\pgfpoint{-5.59\pgflinewidth}{-3.0\pgflinewidth}}%Point8
  \pgfpathlineto{\pgfpoint{-5.48\pgflinewidth}{-3.06\pgflinewidth}}%Point7
  \pgfpathlineto{\pgfpoint{-0.63\pgflinewidth}{-1.09\pgflinewidth}}%Point6
  \pgfusepathqfill
 }

\begin{tikzpicture}[>=varstealth,line width= 1pt,node distance=1cm, auto, description/.style={fill=white,inner sep=2pt},punkt/.style={rectangle,rounded corners,draw=black, very thick,text width=6.5em,minimum height=3.5em,text centered}]

 %nodes
 \node[punkt]                      (Banks)  {Banks ($B_b$)};
 \node[left=4cm of Banks]          (dummy1) {};
 \node[right=4cm of Banks]         (dummy2) {};
 \node[punkt, above=4cm of dummy1] (CB)     {CB};
 \node[punkt, below=4cm of dummy1] (Gov)    {Government};
 \node[punkt, above=4cm of dummy2] (Firms)  {Firms ($F_f$)};
 \node[punkt, below=4cm of dummy2] (HH)     {HH ($HH_{hh}$)};

\path[->]
  (Gov.20)      edge[] node[below, rotate=48]  {\small Bonds}                       (Banks.220)
  (Banks.200)   edge[] node[above, rotate=48]  {\small Deposits}                    (Gov.40)
  (Firms.250)   edge[] node[above, rotate=90]  {\small wage, dividends}             (HH.110)
  (HH.70)       edge[] node[below, rotate=90]  {\small equity, consumption}         (Firms.290)
  (Gov.350)     edge[] node[below]             {\small unempl. benefit}             (HH.190)
  (HH.170)      edge[] node[above]             {\small Taxes}                       (Gov.10)
  (CB.325)      edge[] node[fill=white,below, sloped] {\small interest, OSDF}              (Banks.160)     
  (Banks.143)   edge[] node[fill=white,above, sloped] {\small interest, IDL, OMO, OSLF}    (CB.345)        
  (Firms.200)   edge[] node[above, rotate=48]  {\small principal/interest payments} (Banks.40)
  (Banks.20)    edge[] node[below, rotate=48]  {\small Loans, interest}             (Firms.220)
  (HH.143)      edge[] node[above, rotate=-50] {\small equity}                     (Banks.345)
  (Banks.325)   edge[] node[below, rotate=-50] {\small interest, dividends}        (HH.160)
  (Banks.west)  edge[out=200, in=340, looseness=5] node[below]  {\small interbank loans} (Banks.east);

\begin{scope}[on background layer]   %new code
\path[->, thick](Firms.170) edge[bend right=35]node[above, near end, rotate=60]  {\small Taxes} (Gov.120);
\end{scope}
\end{tikzpicture}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.