Is there better way to align the tip of the red arrow head to the surface of the sphere?
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() 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.
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)