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


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.)

  • Here a Version using a sheared CS. 

    function (PolyLine P_track)
        for (int i = 1; i < P_track.Vertices.Count-1 ; ++i)
            Point dir_point = new Point(this);
            CoordinateSystem shear_cs = new CoordinateSystem(this);
            double x1 = shear_cs.ShearAngle/2;
            Line angle_line = new Line(this);
            angle_line.ByStartPointDirectionLength(P_track.Vertices[i],dir_point, 10);

Reply Children