Explaining vector projection in layman terms

111 Views Asked by At

I've been working on a project that includes the need to project vectors as outlined here: https://gamedev.stackexchange.com/questions/90609/how-can-i-check-if-a-player-drawn-line-follows-a-path.

One of the things that surprised me is that if I'm given something like the below the coverage given is greater than 1. Where we're projecting the squiggly line segment above to the line segment below.

enter image description here

I've been having a hard time wrapping my head around the math behind it as I'm not from a math background. Would anyone be able to explain what is happening behind the scenes in layman terms that further breaks it down than what's out lined in the above post?

Specifically the sum of all the length of vector projections divided by the length of the line segment you're projecting onto, why is it that this works?