code: def view_transformation(E, R, V):
      n = E - R
      ## new
      #    n /= mod(n)
      #    u = np.cross(V,n)
      #    u /= mod(u)
      #    v = np.cross(n,u)
      #    Mr = np.diag([1.]*4)
      #    Mt = np.diag([1.]*4)
      #    Mr[:3,:3] = u,v,n
      #    Mt[:3,-1] = -E
      ## end new
  
      ## old
      n = n / mod(n)
      u = np.cross(V, n)
      u = u / mod(u)
      v = np.cross(n, u)
      Mr = [
          [u[0], u[1], u[2], 0],
          [v[0], v[1], v[2], 0],
          [n[0], n[1], n[2], 0],
          [0, 0, 0, 1],
      ]
      #
      Mt = [
          [1, 0, 0, -E[0]],
          [0, 1, 0, -E[1]],
          [0, 0, 1, -E[2]],
          [0, 0, 0, 1],
      ]
      ## end old
  
      return np.dot(Mr, Mt)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  from six.moves import zip
  import numpy
  import numpy.linalg
label_desc: Use image node_id 6 for calling a global function with example usage: view_transformation(E, R, V) and returns: np