Here a short tutorial combining Python, Cinema 4d and vectors.

I explain how to get the orthogonal vector that bisect another line perpendicularly in the XZ plane. Please have a look on the Internet for the mathematics of orthogonal vectors, Dot product, etc.

Here you can download the source used in the tutorial.