MLNI: Object Interaction Crystal Liu

My project for this week is inspired by a picture I’ve taken in Inner Mongolia.

Since the wheel in that picture is suitable to apply the rotate function. Also I want to add some interaction part such as clicking the mouse or pressing the keyboard. My original thought is that if the user moves the mouse, then a bunch of ellipses with random size will show up and be around the coordinates of the mouse in certain range. I create two objects–bubble and wheel. For the object Wheel I use translate function to set the new coordinate so that the wheel can rotate in the way I expect. But there is a problem, I don’t know why my bubbles cannot move with my mouse, they just rotate with my wheel and it looks weird. I suppose it may have something to do with my previous translate setting in class wheel. But after several tries I failed so I made some slight changes. I decided to use keyPressed function to let users tap arrow key to change the color of the bubbles. In order to make them more natural, I set random data for the size and the color. But I only changed one of the RGB data to ensure the color is in the pink range. In a word, through this practice I found that I still need to learn more about translate function and functions about mouse and keyboard.

Link to my project

Leave a Reply