So you are saying the point you are picking in the semicircle is the point of closest approach to the origin.the distance of the point from origin will also be the distance of the line from origin as the line is perpendicular to the line joining origin and that point so you don't need to look at ##d## again since you already fixed that while picking the point
That's not what you wrote in post #139. There it was the point the shot was taken from.
You cannot have it both ways. For some legal shots the point of closest approach to the origin would be behind the goal line.