I would like to draw in Mathematica two half arrows next to each other. Something like this:
Here is my attempt:
x0 = -0.2;
y0 = -0.2;
k = -1;
dist = 0.02;(*distance between two arrows*)
c1 = Max[c /. Solve[y0 == k x0 + c, c]];
c2 = Max[c /. Solve[-y0 == k (-x0) + c, c]];
xA = x0 - dist/Sqrt[1 + k^2];
yA = k xA + c1;
xB = -x0 - dist/Sqrt[1 + k^2];
yB = k xB + c2;
Graphics[
{{Thick, Arrowheads[0.05], Arrow[{{x0, y0}, -{x0, y0}}],
Arrow[{{xB, yB}, {xA, yA}}]},
{White, Polygon[{{x0, y0}, -{x0, y0}, {xB, yB}, {xA, yA}}]}},
PlotRange -> {{-1., 1.}, {-1., 1.}}, Frame -> True,
PlotRangeClipping -> True]
Form the code you can see that I've drawn two Arrow
s, while covering the right part of each of arrows by white Polygon
.
Here is my result:
(The arrows are under 45° degree angle which was done on purpose.)
I was wondering if there is some Graphics
function in Mathematica for half arrow. Or if one can somehow modify the Arrow
Graphics
in order to get half arrow.
I would be grateful for any suggestions.