code: def rmin(X, Y, r):
      """A  "rounded minimum" function.
  
      Useful for creating bevelled intersections with implicit geometry image
      representations.
  
      See Olah (2011), "Manipulation of Implicit Functions (With an Eye on CAD)".
      https://christopherolah.wordpress.com/2011/11/06/manipulation-of-implicit-functions-with-an-eye-on-cad/
      """
      r_ = np.maximum(r, 1e-6)
      v1 = (
          Y
          + r
          * np.sin(
              np.pi / 4
              + np.arcsin(np.clip((X - Y) / r_ / np.sqrt(2), -1, 1))
          )
          - r
      )
      v2 = np.minimum(X, Y)
      cond = np.less_equal(np.abs(X - Y), r)
      return np.where(cond, v1, v2)
  
imports: import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: rmin(X, Y, r) and returns: np