3. On the line of the hypotenuse $AB$ of the isosceles right $\triangle ABC$, there is a point $P$ satisfying $S=AP^2+BP^2$, then ( ).
(A) There are infinitely many positions of $P$ such that $S<2CP^2$
(B) There are finitely many positions of $P$ such that $S<2CP^2$
(C) If and only if $P$ is the midpoint of $AB$, or $P$ coincides with one of the vertices $A, B$, then $S=2CP^2$
(D) For all points $P$ on the line $AB$, it always holds that $S=2CP^2$