Intro to Computational Media – F11 – Rozin

I tried to use textWidth() but it didn’t seem to work any way I put it. I ask tried to use textLeading, and I think that may be working but I’m not sure! This was a lot harder than I thought it would be because of the loadStrings loading a txt or url. If I had been able to use the whole text within the sketch code itself, it would have been a lot easier.

ICM midterm F11. Sheep and Sleep for the Insomniac.
I had an idea to create a sketch that would encourage people who have trouble sleeping to get sleepy while they put this program on near their bedside. I used OpenCV for the first time, but I did not use any of the fancier tools it provides, like face/blob tracking. That will hopefully come into play later.I had a really hard time with trying to get the image file to move, but I finally got it to work, thankfully. But since I implemented the opencv, the speed at which the sheep moves is really slow, so I amped it up in the code about 700%!

Because of the file attachment and web-cam use with the OpenCV, I could not publish this on Open Processing, unfortunately. I will show it in class on my computer.

My ideas for the midterm project are inspired by insomniacs. I sometimes have trouble sleeping when I can’t seem to stop thinking. At first my idea was to have a program in Processing that would visualize the medical detriment one does to oneself when they don’t get enough sleep, using data from medical journals, etc. that would be categorized and color-coded and would appear on a human body illustration. It would be visually soothing and at the same time encourage the user to put their thoughts to bed and just go to sleep. I wasn’t sure if this would be complicated enough for the midterm, so I kept thinking.

Another idea related to insomnia would be to make a fun “Yawn Game” wherein the insomniac would click on a streaming video of yawners or a simple interface where a (or a series of)  yawn animation(s) would play when clicked, hopefully inducing the insomniac to yawn, too, and feel sleepier. (You know, because yawns are contagious.) I am struggling to think of a way to make it more of an interactive, fun game without penalizing the user and further stressing them out, making the whole thing counteractive to the point.

Along the same lines as the Yawn Game, I had another idea to have a sleep aid in the form of numbered (from 99 or whatever high number to 1) sheep jumping over a fence, inducing sleep. I thought it would be cool if it could be activated on the computer, the person could get into bed, have a projector hooked up, playing the program on the ceiling above the person lying down, so it would just play as they lay there, without having to get up. It would go to sleep automatically.

*addition to this idea^ : add video frame of person in front of camera. Also add tone output of lullabies and intermittent yawn sounds.

Another related idea that I had was inspired by the Pen-sieve in Dumbledore’s office in the Harry Potter books. The insomniac would see a soothing pool/fountain of water playing back at them with video input, and use a text-input to enter their worries or thoughts into a vestibule on the interface. They would then drag the text with a magic wand (the mouse) into the peaceful pool of water or fountain, where they would beautifully fade away and visually extricate themselves of those worries or thoughts so they could go to bed more easily. A soothing water fountain/trickling sound would be played either throughout the whole thing or just upon completion.

These are all therapeutic concepts and I hope I can do one of them in a week with coding that I am not yet familiar with. I need to choose just one.

I built upon my sketch from last week for this assignment on arrays. I was nearly done when I thought I’d add a println command to see what happened. It crashed Processing on my computer, erasing my work. This is my second attempt at this . The ellipses are not so much comets anymore. Try pressing the mouse and also try putting the mouse in the upper right corner.

Link to assignment on OpenProcessing.

Screenshot of successful program:

successful program

successful program

Screenshot of frozen computer.

frozen computer due to println command

frozen computer due to println command

Here is my ICM sketch of a Muppet-inspired character. When the keys W or B (lower or upper case, no matter) are pressed, the character winks or blinks, respectively. The nose color also changes randomly when the mouse is clicked! I had a lot of fun with this. I know that my code could use some cleaning up, and maybe there were better ways to code things, but I did the best I could with the knowledge I gained from the reading and examples. I think I did pretty well — mind you I have no programming experience! What do you think?

(I am having issues with the embed code from not working on WordPress. It seems that I am not the only one.)

<iframe width=”528″ height=”580″ scrolling=”no” frameborder=”0″ src=””></iframe&gt;

Link to sketch? Does that work?

If all else fails, go to where it lives on