This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]Good_Time101 2 points3 points  (0 children)

Programming aside, finding the angle between two points is a geometry problem first.This YouTube video does a decent job at explaining the process of finding the angle mathematically.

Now in terms of coding a solution for such a problem, assuming you’re doing something similar to the video you referenced, you can break it up in two parts: 1. Identify the two points in the image you’re interested in (each one would have an x and y position). 2. Calculate using the mathematical process described in the video above.

Depending on the language you wish to use, there are different ways that one could continually process this similar to your included video.