code: def initial_buffers(num_particles):
      np_position = numpy.ndarray(
          (num_particles, 4), dtype=numpy.float32
      )
      np_color = numpy.ndarray((num_particles, 4), dtype=numpy.float32)
      np_velocity = numpy.ndarray(
          (num_particles, 4), dtype=numpy.float32
      )
  
      np_position[:, 0] = numpy.sin(
          numpy.arange(0.0, num_particles)
          * 2.001
          * numpy.pi
          / num_particles
      )
      np_position[:, 0] *= (
          numpy.random.random_sample((num_particles,)) / 3.0 + 0.2
      )
      np_position[:, 1] = numpy.cos(
          numpy.arange(0.0, num_particles)
          * 2.001
          * numpy.pi
          / num_particles
      )
      np_position[:, 1] *= (
          numpy.random.random_sample((num_particles,)) / 3.0 + 0.2
      )
      np_position[:, 2] = 0.0
      np_position[:, 3] = 1.0
  
      np_color[:, :] = [1.0, 1.0, 1.0, 1.0]  # White particles
  
      np_velocity[:, 0] = np_position[:, 0] * 2.0
      np_velocity[:, 1] = np_position[:, 1] * 2.0
      np_velocity[:, 2] = 3.0
      np_velocity[:, 3] = numpy.random.random_sample((num_particles,))
  
      gl_position = vbo.VBO(
          data=np_position,
          usage=GL_DYNAMIC_DRAW,
          target=GL_ARRAY_BUFFER,
      )
      gl_position.bind()
      gl_color = vbo.VBO(
          data=np_color, usage=GL_DYNAMIC_DRAW, target=GL_ARRAY_BUFFER
      )
      gl_color.bind()
  
      return (np_position, np_velocity, gl_position, gl_color)
  
file_path: pyopencl/examples/gl_particle_animation.py
imports: import pyopencl
  from pyopencl.tools import get_gl_sharing_context_properties
  from OpenGL.GL import *
  from OpenGL.GLU import *
  from OpenGL.GLUT import *
  from OpenGL.arrays import vbo
  import numpy
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: initial_buffers(num_particles) and returns: np_position,  np_velocity,  gl_position,  gl_color