title: How can I number a point list in p5.js
body: <p>is it possible to number a list of points in p5.js?
  Right now I am using ml5.pj for face mesh detections, which outputs x and y coordinates for a set of 465 points.
  I want to select a few. In order to do that, I need to know what are the corresponding indexes.
  Any possible way to do this?</p>
  <p>Not relevant, but on Grasshopper 3D, it is a component called &quot;point list&quot;</p>
  <p><a href="https://i.stack.imgur.com/j1Ce8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j1Ce8.png" alt="enter image description here" /></a></p>
  <pre><code>let facemesh;
  let video;
  let predictions = [];
  
  function setup() {
    createCanvas(640, 480);
    video = createCapture(VIDEO);
    video.size(width, height);
  
    facemesh = ml5.facemesh(video, modelReady);
  
    // This sets up an event that fills the global variable &quot;predictions&quot;
    // with an array every time new predictions are made
    facemesh.on(&quot;predict&quot;, results =&gt; {
      predictions = results;
    });
  
    // Hide the video element, and just show the canvas
    video.hide();
  }
  
  function modelReady() {
    console.log(&quot;Model ready!&quot;);
  }
  
  function draw() {
  //   image(video, 0, 0, width, height);
  background(255);
  
    // We can call both functions to draw all keypoints
    drawKeypoints();
  }
  
  // A function to draw ellipses over the detected keypoints
  function drawKeypoints() {
    for (let i = 0; i &lt; predictions.length; i += 1) {
      const keypoints = predictions[i].scaledMesh;
  
      // Draw facial keypoints.
      for (let j = 0; j &lt; keypoints.length; j += 1) {
        const [x, y] = keypoints[j];
      
        fill(0, 255, 0);
        ellipse(x, y, 3, 3);
      }
    }
  }
  </code></pre>