A Method for BPS Equations of Vortices