Geometrical modification of quaternionic quantum mechanics