Calculate relational directions.