compute_pointing is usable also as a function