BSNS102 Study Guide - Final Guide: Collision Detection, Skew Lines

123 views4 pages

Document Summary

Imagine a 2d point q and a circle with center c and radius r. (the following discussion will also apply to a sphere in 3d. ) We wish to find q", which is the closest point on the circle to q. Let d be the vector from q to c. this vector intersects the circle at q". Let b be the vector from q to q", as shown in figure 13. 3. Figure 13. 3: finding the closest point on a circle. Now clearly, ||b|| = ||d|| r. therefore: Adding this displacement to q to project onto the circle: Computing the closest point on a circle or sphere. If ||d|| < r, then q is inside the circle. There is some question as to what we should do with this situa- tion. If we decide we wish to project the points onto the surface of the cir- cle, then we will have a problem deciding what to do when q = c.