A Method to Measure the Transverse Magnetic Field and Orient the Rotational Axis of Stars