# GLMakie: Length of the arrows

**URL:** <https://discourse.julialang.org/t/glmakie-length-of-the-arrows/80327>\
**Category:** Visualization\
**Tags:** makie\
**Created:** [May 1, 2022, 1:57pm UTC](https://discourse.julialang.org/t/glmakie-length-of-the-arrows/80327 "2022-05-01T13:57:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yashi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yashi/32/19448_2.png) [@yashi](https://discourse.julialang.org/u/yashi)\
**Post date:** [May 1, 2022, 1:57pm UTC](https://discourse.julialang.org/t/glmakie-length-of-the-arrows/80327/1 "2022-05-01T13:57:31Z")

</div>

Is there better way to align the tip of the red arrow head to the surface of the sphere?

It seems `arrows()` draws arrow tail (the straight line) and adds the arrow head. Thus the total length of the arrow is the direction + the length of the head.

I’ve checked [attributes for `arrows()`](https://makie.juliaplots.org/dev/examples/plotting_functions/arrows/index.html) but couldn’t find anything I can use. What am I missing?

This is the best I came up with; subtract the length of the head from the direction.

```julia
using GLMakie
using GeometryBasics

head_len = 0.2

pos = [Point3f(0, 0, 0)]
dir1 = [Point3f(1, 0, 0)]
dir2 = [Point3f(1 - head_len, 0, 0)]
sphere = GeometryBasics.Sphere(Point3f(0), 1)
f, a, p = wireframe(sphere, color=:gray, transparency=true)
arrows!(a, pos, dir2,
        linewidth = 0.05,
        arrowsize = Vec3f(0.1, 0.1, head_len),
        normalize = false,
        color = :red)

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/0/8/0840113c63dce8b92866c11458c9004f0c4ec6df.jpeg)

---

<div class="post-metadata">

**Author:** ![yashi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yashi/32/19448_2.png) [@yashi](https://discourse.julialang.org/u/yashi)\
**Post date:** [May 3, 2022, 1:34am UTC](https://discourse.julialang.org/t/glmakie-length-of-the-arrows/80327/2 "2022-05-03T01:34:24Z")

</div>

As of this writing, `arrows()` doesn’t do it.  
Refer to an issue at github:  
[https://github.com/JuliaPlots/Makie.jl/issues/1206](https://github.com/JuliaPlots/Makie.jl/issues/1206)
