JSON Visualization
For this week’s recitation, I am trying to visualize a data set given by my instructor. This data set is about the location of parts of body as well as their labels. During this process, I solidified my knowledge about JSON, and explored the usage of lerp function.

First, I imported the data set as a JSON file, I declared a variable named “data“, and I loaded the JSON file to my script. I then utilized the Console to check the JSON data, which showed up as successfully loaded as the image below has shown.

Next, I iterated each element in the “body points” array with a For loop function, and each body points have their corresponding“x” and “y” coordinates. Later, I drew small ellipses based on the coordinates and connected them with line. Last but not least, I improve the visual by changing colors and using random to formulate multiple lines to assimilate to the muscle appearance. I also use lerp function to change the size of the circle by frame.
Here is the link to my codes: