Added normal-vector computing function