code: def generate_points(length=3):
      """Generates points via recursive function and generate triangles using
      Scipy Delaunay triangulation
  
      Parameters
      ----------
      length : int
          (2 ** length + 1 by 2 ** length + 1) number of points is generated
  
      """
      print("Points are being generated...")
      global points, triangles, height
      size = 2 ** (length) + 1
      points = np.indices((size, size, 1)).T[0].transpose((1, 0, 2))
      points = points.astype(np.float32)
      generate_terrain(0, size - 1, 0, size - 1, length)
      height = length
      points = np.resize(points, (size * size, 3))
      points2 = np.delete(points, 2, 1)
      tri = Delaunay(points2)
      triangles = points[tri.simplices]
      triangles = np.vstack(triangles)
      print("Points successfully generated.")
  
file_path: vispy/examples/demo/gloo/terrain.py
imports: from vispy import gloo
  from vispy import app
  from vispy.util.transforms import perspective, translate, rotate
  import numpy
  from scipy.spatial import Delaunay
label_desc: Use image node_id 2 for calling a global function with example usage: generate_points(length) without return types