Alondra Guerra

← IAT 806

Lab 06 - Balls from scratch

An interactive animation with colorful moving balls.

My Sketch

How It Works

In this lab, I created a Ball class from scratch using JavaScript and p5.js. Each ball has its own position, color, and size. The balls move randomly and change size throughout the animation.

I added mouse interaction so that clicking on a ball changes its color. I also used ml5.js and the webcam to detect my body. The balls respond to the body segmentation mask by changing color.

Reflection

The most challenging part was everything. This is still hard for me, I needed help. For implementing body segmentation with ml5.js, I had to revisit the reference material and check the browser console to understand how the segmentation results were structured.