Bisector between two 3D lines

I need to locate a CS point at the intersection of two 3D lines that are not in the same plane. The CS point needs to be rotated (around Z) half of the angle of the two 3D lines. in other words it needs to be half the angle of the bearing difference of the two .3D lines. please also refer to bisector.dgn link below, this is a bisector script but it calculates the half angle of 3d lines in any direction

/cfs-file/__key/communityserver-discussions-components-files/360/bisector.dgn

this image shows the CS rotated half the bearing angle between the two lines. looking in plan regardless of lines being 2D or 3D 

( bearing is the horizontal angle between the direction of an object and another object, or between it and that of true north.)