(bind-func arrows_set_head_vert
(lambda (x y headxval headyval)
(let ((idx (* (+ (* x grid_size_y) y) 4)))
(pset! arrows_verts
(+ idx 2)
(+ (pref arrows_verts idx) headxval))
(pset! arrows_verts
(+ idx 3)
(+ (pref arrows_verts (+ idx 1)) headyval)))))