Self Portrait 2 - Interactive

With some help, this self portrait became interactive - click on over to try for yourself (Allow access to the web cam if Chrome asks…) or see the code here

So a pleasant situation led to this modification of my self portrait. I ran into Jiwon in the hallway who was having trouble with her combination lock. She wasn’t able to get into her locker so I helped her to get it right, and I thought - maybe she would be down to lend a hand on my Self Portrait!

I had the idea to make the brightness on my mac’s webcam raise the eye brows on my p5Js sketch. She is a coding whizz and showed me how to initialize a variable to call the web cam, analyze the RGB values of each pixel in the camera for brightness and convert that analysis into a single average value. I plugged that value onto the anchor points of my bezier eyebrow lines and with a little tweaking - voila!

So I went further and thought that I could get the eye lids, iris, and pupil to do the same, but was having some trouble, so a 2nd year student named ______ came over and used the constraint function to better scale the values, as they were getting way to large when the light was bright. And that’s how we arrived at the final product. You may have to enable your webcam to get the code to run and of course, everyone’s camera will be brighter along with the environment that you are in so FYI.

Here’s the LINK to the p5Js code.