Hi all,
This is for 2D...
Say I have a circle at Point pt, with radius r ...
And I have a line that goes from Point p1 to Point p2.
Assuming the circle is embedded in the line, I want to know-- as fast as possible, without normalizes, etc, if that's even possible-- what direction to push my circle in to unembed it most efficiently.
I currently have a pretty simple method where I do this:
1. Find closest point on line to center of circle
2. Take vector of that to center of circle and normalize it
3. Move circle in that direction.
Is there a faster, math wizardy way?
Thanks!