top of page
kantakanvay

Introduction to Computational Media - Week 2


Relationships







Using variables, I created positive/negative relationships among the elements of the p5 self-portrait sketch I made during week 1. A positive relationship exists between two objects when they are in direct proportion (when one increases, the other does too) and a negative relationship exists when the objects are inversely proportional to each other (when one increases, the other decreases).


To incorporate the above-mentioned concepts in my sketch, I thought of animating a few elements to literally represent a positive side (what makes me happy) and a negative side (what brings me down). As a visual person, I have always loved color. So, the element of color brings me joy. I added my pet bunnies to my sketch last week which also make me happy every time I see them. To change between the two sides, I incorporated the system variable mouseY in the curve function that I used to draw my mouth. So, when my mouse moves up and the smile turns to a frown - the color and the bunnies disappear. And when the frown turns to a smile again, the bunnies and the colors reappear.


I wanted to fade the colors in and out instead of it being an ON/OFF motion, and I did get the fade to work the first time (right when I run the code) but it only works then and not each time I change the smile to a frown and vice versa. Hopefully, I can do that in the coming weeks.


Edit: I managed to get the fade to work in the end :)



9 views0 comments

Comments


bottom of page