ai_creativity_design/Expressive_Movement/main_line.js
// A function to draw the skeletons
A function to draw the skeletons
A function to draw the skeletons
function drawSkeleton() {
  for (let i = 0; i < poses.length; i++) {
    let skeleton = poses[i].skeleton;
    for (let j = 0; j < skeleton.length; j++) {
      let partA = skeleton[j][0];
      let partB = skeleton[j][1];
      stroke(75, 0, 130);
      line(partA.position.x, partA.position.y, partB.position.x, partB.position.y);
    }
  }
        console.log(noseArray);
        console.log(leftWristArray)
       strokeWeight(2);
       makeVectors("nose", pose, j, noseArray);
       makeVectors("leftWrist", pose, j, leftWristArray);
       makeVectors("rightAnkle", pose, j, rightAnkleArray);
       stroke(125,124, 124);
       makeConnections(leftWristArray);
       makeConnections(noseArray);
       makeConnections(rightAnkleArray);
     }
   }
}
function drawSkeleton ( ) { for ( let i = 0 ; i < poses . length ; i ++ ) { let skeleton = poses [ i ] . skeleton ; for ( let j = 0 ; j < skeleton . length ; j ++ ) { let partA = skeleton [ j ] [ 0 ] ; let partB = skeleton [ j ] [ 1 ] ; stroke ( 75 , 0 , 130 ) ; line ( partA . position . x , partA . position . y , partB . position . x , partB . position . y ) ; } } }
A function to draw the skeletons
A function to draw the skeletons
// Loop through all the skeletons detected // For every skeleton, loop through all body connections // for (var i = 0; i < poses.length; i++) { //   let pose = poses[i].pose; //   for (var j = 0; j < pose.keypoints.length; j++) { // //     // console.log(noseArray); //     // console.log(leftWristArray) //     strokeWeight(2); //     makeVectors("nose", pose, j, noseArray); //     makeVectors("leftWrist", pose, j, leftWristArray); //     makeVectors("rightAnkle", pose, j, rightAnkleArray); //     stroke(125,124, 124); //     makeConnections(leftWristArray); //     makeConnections(noseArray); //     makeConnections(rightAnkleArray); //   } // }