main/src/georegression/metric/ClosestPoint3D_F64.java
public static Point3D_F64 closestPointOrigin( PlaneGeneral3D_F64 plane , Point3D_F64 found ) {
		if( found == null )
			found = new Point3D_F64();

		double n2 = plane.A*plane.A + plane.B*plane.B + plane.C*plane.C;

		found.x = plane.A*plane.D/n2;
		found.y = plane.B*plane.D/n2;
		found.z = plane.C*plane.D/n2;

		return found;
	}
public static Point3D_F64 closestPointOrigin( PlaneGeneral3D_F64 plane , Point3D_F64 found ) {
		if( found == null )
			found = new Point3D_F64();

		double n2 = plane.A*plane.A + plane.B*plane.B + plane.C*plane.C;

		found.x = plane.A*plane.D/n2;
		found.y = plane.B*plane.D/n2;
		found.z = plane.C*plane.D/n2;

		return found;
	}
public static Point3D_F64 closestPointOrigin ( PlaneGeneral3D_F64 plane , Point3D_F64 found ) { if ( found == null ) found = new Point3D_F64 ( ) ; double n2 = plane . A * plane . A + plane . B * plane . B + plane . C * plane . C ; found . x = plane . A * plane . D / n2 ; found . y = plane . B * plane . D / n2 ; found . z = plane . C * plane . D / n2 ; return found ; }
Finds the closest point on the plane to the origin.

@param plane The plane
@param found (Optional) Storage for the closest point.  Can be same as instance as 'pt'. If null a new point is declared internally.
@return The closest point
Finds the closest point on the plane to the origin .