code: def get_intersection(
      cx1, cy1, cos_t1, sin_t1, cx2, cy2, cos_t2, sin_t2
  ):
      """return a intersecting point between a line through (cx1, cy1)
      and having angle t1 and a line through (cx2, cy2) and angle t2.
      """
  
      # line1 => sin_t1 * (x - cx1) - cos_t1 * (y - cy1) = 0.
      # line1 => sin_t1 * x + cos_t1 * y = sin_t1*cx1 - cos_t1*cy1
  
      line1_rhs = sin_t1 * cx1 - cos_t1 * cy1
      line2_rhs = sin_t2 * cx2 - cos_t2 * cy2
  
      # rhs matrix
      a, b = sin_t1, -cos_t1
      c, d = sin_t2, -cos_t2
  
      ad_bc = a * d - b * c
      if ad_bc == 0.0:
          raise ValueError("Given lines do not intersect")
  
      # rhs_inverse
      a_, b_ = d, -b
      c_, d_ = -c, a
      a_, b_, c_, d_ = [k / ad_bc for k in [a_, b_, c_, d_]]
  
      x = a_ * line1_rhs + b_ * line2_rhs
      y = c_ * line1_rhs + d_ * line2_rhs
  
      return x, y
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  import numpy
  from matplotlib.path import Path
  from operator import xor
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: get_intersection(cx1, cy1, cos_t1, sin_t1, cx2, cy2, cos_t2, sin_t2) and returns: x,  y