Little Wonders

IMG_5081

IMG_5082 IMG_5083

Ever since I was a kid, I’ve always been fascinated by the idea of our stuffed animals and toys coming to life, quite similar to the various toys from Toy Story. Having that vision in mind and after discussing my idea to a few classmates, I decided to bring some of Toy Story to life. My inspirations came from revisiting old children movies where all the objects and creatures were personified.

“Little Wonders” explores the idea of objects moving and interacting when we aren’t there to see the interactions exchanged. I loved the idea that we existed in a world with a more fantastical side that we may never be able to fully unveil.

Some of the technical challenges included trying to create a realistic interpretation of the “creatures'” movements. I wanted the movements to appear subtle so people would second guess themselves, but at the same time smooth enough so that they don’t appear as robotic as the servos. I added an easing effect to help ease the changes in movements. Another challenge was connecting the power chord to the teensy while keeping it hidden. In the end, I placed the shelf slightly between the two doors so that the chord can slip behind the shelf and between the doors inconspicuously.

fritzing_bb

 

 
#include 
int duration = 3500;

// metros 
Metro mouse1 = Metro (duration);
Metro mouse2 = Metro (duration);
Metro jaguar = Metro (duration);

//servos 
Servo sMouse1; 
Servo sMouse2; 
Servo sJaguar; 

// destinations 
int dm1_0; 
int dm2_0; 
int dj0; 
// destinations to be smoothed
int dm1_0_sh; 
int dm2_0_sh; 
int dj0_sh; 

float easing[] = {
  0.09,0.08,0.03};

const int motionPin = 0; 
int noMotion; 
int mouse1Motion = 0; 
int motionLevel; 

void setup(){
  Serial.begin(9600);

  // pin 5 missing 
  sMouse1.attach(0); 
  sMouse2.attach(1);
  sJaguar.attach(2); 

  // intial destinations 
  dm1_0 = 0; 
  dm2_0 = 90; 
  dj0 = 135; 
  // intial destinations to be smoothed
  dm1_0_sh = 0; 
  dm2_0_sh = 90; 
  dj0_sh = 135; 

  noMotion = 0;
}

void loop(){
  motionLevel = analogRead(motionPin); 
  motionLevel = map(motionLevel,0,656, 0,100); 
  motionLevel = constrain(motionLevel, 0,100); 

  //motionLevel = 0;

  if (motionLevel < 20 ){     noMotion ++;      if (noMotion >= 100){

      if (mouse1.check() == 1){
        dm1_0 = random(0,180);

        mouse1.interval(random(200,800)); 
        mouse1Motion ++; 
      }
      dm1_0_sh = dm1_0_sh *(1.0 - easing[0]) + dm1_0 * easing[0];
      sMouse1.write(dm1_0_sh);

      if (noMotion >= 120){
        if(mouse1Motion >= 10){
          if (mouse2.check() == 1){
            dm2_0 = random(0,180); 

            mouse2.interval(random(300,800)); 
          }
          dm2_0_sh = dm2_0_sh * (1.0 - easing[1]) + dm2_0 * easing[1];
          sMouse2.write(dm2_0_sh);
        }
      }

      if (noMotion >= 150){
        if (mouse1Motion >= 14 ){
          if (jaguar.check() == 1){
            dj0 = random(90,180); 

            jaguar.interval(random(500,2000));
          }
          dj0_sh = dj0_sh * (1.0 - easing[2]) + dj0 * easing[2];
          sJaguar.write(dj0_sh);
        }
      }
    }
  }
  else{
    noMotion = 0; 
  }
  //Serial.print("motion: ");
  Serial.println(motionLevel);
  //Serial.println(dj0_sh);

  delay(25);
}

 

 

 

Maryyann-Looking Outwards + Final Ideas

1.Comet

Comet is a phone booth that allows one to have private calls while in an enclosed space. The builders hacked into an old hair dryer helmet using Arduino circuits and created a special helmet that streams the voice of the person you’re calling while a microphone captures your own voice. I was inspired by this video and wanted to incorporate some kind of sound recognition in my final project.

I think the appearance of the project could have been greatly enhanced, but the video didn’t seem like the final product, so I’m expecting to see a cleaner video of this creation.

Comet from Pedro Andrade on Vimeo.

2. Standuino Pi 

This project involves syncing a microGranny and frauAngelico together to create musical combinations. The Standuino microGranny is a pocket sized handmade granular sampler. It uses a microSD card to store samples and allows you to change many different parameters. Since I’ve never messed with sound before on the arduino, I wondered how I could use it to create a communication between the user and my piece.

Standuino π [pi] synced with frauAngelico + microGranny from standuino on Vimeo.

3. Sweatshoppe

Sweatschoppe takes place in Europe. It involves a group of new media artists and their vision to create two-story tall video paintings. As each artist, rolls their paint roller across an empty wall, a new part of a video clip is revealed. This is done through computer software tracking the location of the paint roller. Video Painting allows them to create the illusion of painting on walls through electronic paint rollers.

I think this is an interesting idea and I wanted to try and incorporate not just projection, but also motion tracking in my final project similar to the paint roller.

SWEATSHOPPE Video Painting Europe from SWEATSHOPPE on Vimeo.

Final Ideas: 

1) Polly

Sound became a trigger while I was searching through examples and inspirations for my final project. One idea I had was playing with voice recognition, but I realized that the shields were really expensive for that piece of hardware. So I looked in another direction because usually if you combine a variety number of smaller cheaper shields or sensors, you can recreate essentially the same effect.

My first idea called Polly because it is a parrot that tracks your movement, and repeats back to you what you say, but in a parrot voice.

2)  Tank 

My second idea involves the combination of arduino and augmented projection.

I think it is fair to say that the world we live in is parallel to the ocean. Each person or living creature can represent a tiny fish in the vast open ocean. For this idea, I want to have an empty “ocean” projected onto a section of the wall. As people walk by, each person will drop into the ocean as a fish, which will involve motion tracking. Depending on the type of fish dropped, the fish will either stay in the view, or follow its “owner” out of the frame.

 

IMG_5750

Shields – Maryyann

2.8” TFT Touch Shield for Arduino

From the first time I laid eyes on this arduino shield, I was super impressed of the power of a small arduino.  Not only does this shield come with a  built in microSD card connection, but it controls a large touchscreen display as well. The display has a decent resolution and a touch sensitive screen that can detect a user’s finger given any location.

Simply plug is in and load up the library and then you’ve got yourself a working touch sensitive, large display arduino shield.

Touch Shield Touch Shield2

 

LCD Shield Kit w/ 16 x 2Character Display

Arduino builders often have trouble with LCD projects because they require so many pins. Using most of the pins means that the arduino would have far less components and abilities. This new LCD Shield Kit requires only 2 I2C pins on the Arduino and let’s the user control 3 backlights pins and 5 keypad pins. I really like this shield because it doesn’t need unnecessary wiring.

LCD shield

 

18-bit Color TFT Shield w/ microSD and Joystick

As I was browsing through the shields I realized I really liked the more visually stimulating shields. I liked the shields that enhanced image or character display a lot. For example, this 18-bit color tft shield allows the user to add a small colorful and bright display to any arduino. There is a microSD card slot and a 5-way joystick navigation switch included as well. I think these visual displays really show how the arduino is like a mini computer.

18 color 2 18 color

 

Looking at the AdaFruit

1) 3D Printer creates Light-Weight Titanium Horse Shoes

The article highlights the power of 3D printing. Researchers from CSIRO created custom made titanium horse shoes from 3D printing as a means to explore new ways to use 3D printing. Printing a set of four horse shoes take less than 24 hours to create and costs a total of 600 dollars. Usually made from aluminum and weighing up to one kilogram, horse shoes can weigh the horse down. 3D printed shoes weigh half the weight of regular horse shoes so the horse can reach new speeds.

I’m not sure if the cost is worth the decrease in weight. Perhaps there is a better substitute. Although, the 3D printed shoes can be made faster and the 3D scanner is able to create custom shoes for every horse hoof it scans in, I don’t think such a benefit is necessary for every horse. Maybe if the enhanced shoes would boost a horse’s chance of winning a race, then owners should invest in them. But other than that, I don’t think it’s worth the cost of 3D printing.

http://www.abc.net.au/news/2013-10-17/an-horse-shoe-printed-by-3d-to-improve-racing-performance/5027306

2 .) PI-Bot –B (mobile robots with Raspberry Pi)

The PiBot-B is a small mobile robot that controlled by a Raspberry Pi. He moves on caterpillar tracks so that it can run on slightly uneven flooring. An image from a webcam video is transferred wirelessly to an IPhone with an application that controls the robot. If the robot is on autonomous mode, it can move by itself and uses sensors to detect obstacles. On the application, the top half shows the video stream while the bottom resembles a numpad, each controlling a different motion for the robot.

I think this is very cute and interesting project. Although it does seem like a common project involving an arduino and a webcam, it still fascinates me how a chip can be programmed to complete so many different tasks. The application numpad not only allows the robot to move forward and turn, but also rotate on the spot, which produces smooth curves. Having it move by itself when users aren’t in control produces an artificial intelligence effect.

http://translate.google.com/translate?hl=en&sl=de&tl=en&u=http%3A%2F%2Fwww.retas.de%2Fthomas%2Fraspberrypi%2Fpibot-b%2F

3) Robot Nail Art

Robot Nail Art by Charles Aweida involves the collaboration of several different programs, Kangaroo physics, Grasshopper3d, Rhino3d, fed into HAL(robotic control sweet) to fabricate the effects of wind on a piece of cloth frozen at a specific frame. The result of the capture results in a series of vector fields that simulate the representation of wind. The robot that receives these points is combined with an inverse kinematics solver with converts the planes into joint angles that serve as the instructions for the robot. The robot will then place these nails at these specific angles onto high density foam.
I found this project to be especially unique and interesting. Fabric simulation creates beautiful planes in the computer, once modeled out. To bring reality into the digital world and then back into reality describes the process of the project. It introduces a new way of capturing moment in time. The robotic arm plays a huge part in this project because it is able to accurately pinpoint each nail at every angle without conflicts or mistake.
A similar project I found that used robotic simulation also involved an ABB robot. It captured images of people in front of it with a camera and the robot would turn that captured image into a drawing using a black felt tip pen.

http://www.ensci.com/actualites/une-actualite/article/17574/

http://cka.co/projects/representing_wind/

nail art test 1 from charles aweida on Vimeo.

Shadow Paint

For my projection project, I wanted to utilize sound while using box2D. It was really difficult for me to come up with an idea. At first I thought about creating eyes onto an inanimate object to give it life. But it was too similar to the creature project. As I was wondering what to create, my eyes fell upon the different colored glazes I bought for my clay mini class. I projected light onto the different glazes at an angle and realized that if the camera were tilted at a certain angle, I could play with just the shadows of the glaze containers because they were higher on the wall than the actual objects.

Why not mess with the shadow’s of the object? The shadows are black, and if I project black onto them, they will be saved. This created another curious layer as to what we are allowed to interact with. By interacting with actual objects, we extract something from fantasy and implement it into reality. Playing with the shadows seem like an even more fantastical experience. While the object is untouched, the shadow, the “child” of the object, which is supposed to mirror the object, transforms separate from it’s “parent”.

 

Buzz – Slurp

I began this project with a simple question in mind, how could I simulate a living creature? I thought about making something that would expand and deflate to simulate breathing. The simplest thing was to plug some eyes onto a shape, as Golan pointed out to me.By making it blink once in a while, the object becomes alive. My thoughts wandered and eventually landed on food. Creatures all need to eat right? So I started to formulate a critter that would devour another critter. I wanted to make something approachable, entertaining, and different from my previous projects.

After some quick sketches, I decided to create a baby chameleon-like creature, named Camel.

camel_2

camel_3

camel_4

camel1

I wanted to give my creature an environment where he could live, but it would have to be contained enough so he wouldn’t escape. The first thought that came into mind was just to make a simple boxed out area on the canvas so he wouldn’t be able to step out of the border. Simple enough right? However, I felt like that didn’t depict the life of a chameleon. A chameleon is a slow careful creature that spends most of its life up in the tree tops, catching bugs. I thought that this type easy-going lifestyle needed a fluid shape that would represent something soft, without extreme changes.

Furthermore, I wanted to describe a cycle in life. When the fly would buzz around the chameleon, within a certain range of Camel’s vision, he would reach out for the fly with his tongue. But Camel is still a baby, so sometimes the fly would get away when it twitches violently enough. The viewer can also chose to help out Camel catch the fly. The fly naturally wants to run away from anything coming towards it, so if you push scare it in the right direction, Camel will be able to eat it.

 

Looking Outwards- Maryyann Landlord

Hyper(Reality)

This project contains a helmet which allows the user to enter a sort of digital world, surrounding the user in an alternative version of reality through the helmet. The user can navigate through the digital world created by the helmet while still interacting with the physical world outside of the helmet. It creates an odd and curious median between the two states.

I found this project interesting because of the combination between what is real and what is fabricated. The ability of the project to combine the two is very attractive for me. If further explored, the digital world can have certain surprises or friendly characters that the real world doesn’t’ contain. The user can then enter a digital game world, in which the game utilizes the real world to create levels or advances. I think to have those subtle differences in the two worlds will bring about the question of what is reality and what is invented. Is reality what we perceive in our own minds about the world of which we have control over or is it simply an observation that we accept?

I think a very effective part of this project was the way the digital world look. It had a much digitized effect in the way the image is rendered. The artist of this piece, Maxence Parache seems to involve his artwork in a lot of digital design. His website reveals different projects such as Data Visualizatino of Holborn Traffic, The Yagi Project, which can be used to listen to frequencies from satellites by relying on radio messages sent from hundreds of kilos away.

It is definitely a project of high potential and can be utilized in games or digitalized designs.

 

Hyper(reality) – Geffrye Museum from Maxence on Vimeo.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Dodoecaudion

Dodoecaudion is an audiovisual controller assembled from infrared distance sensors, arduinos, Bluetooth, processing and osc. It manipulates sounds as people glide their hands across the openings of the spatial suspended device. The source code is open and the CAD documentation and schematics as well.

The most intriguing part of this piece for me is its geometric simple design. The design is clean and pristine and gives it an almost foreign feel because it is so simple yet creates such beautiful music. I think the inside of the piece could have been more carefully designed so the inside could be just as simple in appearance as the outside. Of course, since the piece is still in its alpha stage at the moment, there are still incomplete qualities to the piece that will be changed before it goes on production.

The artists behind Dodoecaudion create a lot of musical based interactive products, such as their panGenerator-Peacock, which is an interactive kinetic audiovisual installation shakes three panels of lights as the piece produces chaotic sounds.

 

DODECAUDION from ◥ panGenerator on Vimeo.

panGenerator – PEACOCK from Jakub Koźniewski on Vimeo.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Radiance

I found this project very gorgeous. Radiance is a wall consisting of acrylic flower petals that light up according to the motion of people walking around. It was assembled and installed on a standalone fireplace in the house of a family who rarely used their fireplace. The team proposed an idea of orating and lighting up the family’s life by installing this interactive light piece on top of the brick fireplace.

Although the design is fairly simplistic, I think the idea behind the piece is very compelling and beautiful. From an ordinary bland fireplace that was rarely used, the team transformed it into an art piece that would bring the family together as it lit up when members walked around the piece. I think it was a great touch to make the lights light up based upon movement, which engages interaction with the piece. By having an irregular lighting effect, the flower petals appear almost alive.

Upon exploring their website(http://www.projectione.com/), I recognized that they used a lot of lighting in their pieces and have a distinct signature of assembling many little repeated pieces to create a larger piece. I think an improvement they could have made to the Radiance piece was to have the flowers glow slightly a different color at night or during different times of the day. I think by having that variety, the piece would gain even more life. Many flowers, such as day lilies, open during the day and close at night, while other flowers just live for one day and die off in the night while other buds replace them. By giving the wall of acrylic flowers more life creates a fantastical and curious feel just as it would when one blurs the line between a manmade object and an organic living object.

 

Radiance from PROJECTiONE on Vimeo.

 

Rain Water-Maryyann Landlord

In the beginning, I wanted started with the idea of creating a 3 dimensional object from the 2 dimensional cut outs. It would be cut out into separate parts and then assembled after the pieces were popped out. My idea was a fish, with 9 circular disks as “ribs” and supporting beams going around the body as well as fins and a tail. However, after making some calculations, I realized how precise the measurements would have to be and the fact that aesthetically speaking, a generated pattern of sorts would have a better visual appeal.

Images of my idea:

IMG_4211

IMG_4212

Next I explored other areas that would create a more visually pleasing piece. Since we recently learned about particles, I decided to incorporate that into my piece. I thought about the effect of rain dropping on the ground on a rainy day. From there my thoughts wondered towards the comparisons of the effects of water. How could I show contrasts between the same element? I also wanted to explore text because I had never used text in my pieces before.

Following that thought, I decided to represent rain drops using letters of the alphabet,which was the first appearance of water. The “rain” fell slightly at an angle, at different speeds which gave it the calming appearance of rain. I needed more types of water. So, I placed an invisible pool of water at the bottom of the piece, which gathered the rain letters and slowly dispensed them to the bottom, where they were recycled back as rain. I thought it was interesting that the letters, which begin as rain(water) fall into another pool of water, but then gain the appearance of a solid object while the viewer still understood them as rain drops.

This is a fairly simple design which I think creates more satisfaction as a animated piece than a static one. A single photo merely doesn’t contain the comparison of the water against water as the moving piece contains. I do understand though, laser cutting letters may become a problems due to the little number of closed shapes that come with the alphabet, but I think it’ll be interesting to see how it plays out.

use the arrow keys to see it animate:

http://cmuems.com/2013/a/wp-content/uploads/sites/2/2013/10/rain.pdf

update:

After downloading the geomerative library, I used it to tweak my code so that all the falling letters became outlines. Now, the laser cutting will be able to cut around the shape and they will become visible. One problem I realized I had after first remaking the piece, was that certain letters would have huge holes because of the way the letters connected to themselves. So, I changed the ending to the letters and reconnected it to another point and therefore leaving another space for the laser cutting to go around. I added a phrase as well in the various letters so that when people look closely, they will find a present surprise.  Another add on I implemented was a repulsion force the letters had towards every other letter. However, because the library and the number of letters made the code run quite slowly, the repulsion didn’t work as well as I wanted it to. I do hope that after changing the code, the laser cutting will cut the pdf correctly.

updated:

http://cmuems.com/2013/a/wp-content/uploads/sites/2/2013/10/rain1.pdf

http://cmuems.com/2013/a/wp-content/uploads/sites/2/2013/10/rain2.pdf
 

http://cmuems.com/2013/a/wp-content/uploads/sites/2/2013/10/rain3.pdf

Dust Mites -Maryyann Landlord

TheSootballs

dust2

Sometimes, we forget to notice that the tiny common things around us can also be some of the most beautiful. Dust balls are often disliked due to their nature of sticking to things and cause of allergies. However, when shown in slow motion and against the light, their paths traveled through the air become quite alluring.

For my project, I wanted to simulate pollution as it flowed through the air. I got my inspiration both from my previous clock project and from the sootballs in the movie, Spirited Away. The way that the air emphasized the sootballs’ lightness captured my interest.

At first I mapped the size of the eyes to the arguments that faceOSC outputted. Every time something changed, the program would output a number for the change. I figured out the difference between my opened eyes and my closed eyes. Then, I changed the size of the soot balls based on my blinking. Using the same tactic as I did with my eyes, I mapped the force of the wind to the height of my mouth. I wanted to allow people to interact in a way that would be nature for them to do in real life with dust. Therefore, when one’s mouth would open as if to blow them away, the dust balls fly at a speed depending on how big the mouth is opened.

I think I managed the simulation of the lightness of the soot, but I wish I could have made them slowly flow upwards again after changing direction, instead of so abruptly. I also wish I could have added a windmill as a decoration on the side. This was a really fun project though,  and I learned a lot of about making classes and utilizing them through your draw function.

(video pending)

dust mites from Maryyann Landlord on Vimeo.

 

Deep Sea – Maryyann Landlord

My idea was derived from  the deep underwater scenery one would often see on discovery channel. I wanted to originally create a dark open ocean with only a few light up microorganisms as the keys to second, min, and hourly changes. However, I realized that having more visualizations in the water made the clock composition more interesting.

I wanted to use the bubbles traveling up as a backdrop wallpaper for the other moving objects in the piece do give the piece a little more depth. I think that I was able to simulate an underwater feeling quite smoothly. I would like to have used more animation with pngs and I think I could have made the flashing. One thing I really liked, which was simple, yet cute, was the ripple on the top of the water that would blink, when the organism hit the top of the screen. I also realized that because of the way I layered my backgrounds, the longer you wait for them to build up, the “deeper” the ocean would seem.

Deep Sea Breakdown: The yellow flashing organism , which move around slightly, represent the seconds. The color changing round organism that bounces around the screen changes it’s size slightly. Every hour, the screen is covered by a thin layer of white, which eventually when it becomes difficult to see the ocean clearly, is lifted once again. This process takes place in the course of one day.

After one Day:

whiteness

 

After a few min of waiting:

pretty

 

Open Processing Link: http://www.openprocessing.org/sketch/112116

PImage rocky; 
PImage blur; 
int whiteness; 
int prevSecond, prevMin, prevHour; 
color[] bcolor = {
  #063260, #13587F, #021931, #24455C
    , #689EA1
};

int frames; 
int colr;

//Blight 
Blight myBlights[]; 
float bx, by; 
int  blightCount;

//jelly
Jelly myJelly; 
float jx, jy; 

// bubbles
Wave waveArray[];
int waveCount; 
int jSize; 

void setup() {
  size(600, 1000);
  background(#00131C);
  frameRate(10);
  whiteness = 0; 

  rocky = loadImage("rocky.png");
  blur = loadImage("blur.png");

  waveCount = 20;
  waveArray = new Wave[waveCount];
  for (int i = 0;i< waveCount; i++ ) {
    float size = random(7, 20); 
    waveArray[i] = new Wave(20 + i* 30, height, size);
  }

  jx = random(10, width-10); 
  jy = random(10, height-10); 
  jSize = 10; 
  myJelly = new Jelly(jx, jy, jSize);

  blightCount = 50;
  myBlights = new Blight[blightCount];
  for (int i = 0;i< blightCount; i++ ) {
    float bSize = random(2, 7);
    bx = random(10, width-10);
    by = random(10, height-10);
    myBlights[i]  = new Blight(bx, by, bSize);
  }
}

void draw() {
  int s = second(); 
  int m = minute();
  int h = hour(); 

  for (int i = 0; i < waveCount; i++ ) {
    waveArray[i].make();
    waveArray[i].update();
  }

  myJelly.render(); 
  myJelly.update(jSize); 

  if (frames % 60 == 0) {
    int index = int(random(0, bcolor.length));
    colr = bcolor[index];
  }

  drawParticles(); 

  noStroke();
  fill(colr, 40);
  rect(0, 0, width, height); 
  fill(255,255,255,whiteness); 
  rect(0,0,width,height); 

  tint(255, 30);
  image(blur, 0, 0);
  tint(100, 50);
  image(rocky, 0, 0);

  if (h != prevHour) {
    if ((whiteness < 100) &&(h > 1)) {
      whiteness += 5;
    }
    else {
      whiteness = 0;
    }
  }

  if (m != prevMin) {
    if ((jSize < 100) && (m > 1)) {
      jSize += 1.5*5;
    }
  }
  else {
    jSize = 10;
  }

  for (int i = 0;i< blightCount; i++ ) {     if (s != prevSecond) {          myBlights[i].render();       myBlights[i].update();     }   }   prevSecond = s;   prevMin = m;   prevHour = h;    frames ++; } void drawParticles() {   noStroke();   fill(#D8F2F9, 50);   ellipse(random(0, width), random(0, height), 5, 5);   fill(#D1F2BA, 50);   ellipse(random(0, width), random(0, height), 10, 10);   fill(#FF4D6A, 50);   ellipse(random(0, width), random(0, height), 7, 7); } class Blight {   float x;    float y;    int angle;    float size;    float speed;    color[] blcolor = {     #EBBA57, #D28B44   };   int col;    Blight(float bx, float by, float s) {     x = bx;      y = by;     size = s;      angle = 0;   }   void render() {     int index = int(random(0, blcolor.length));     col = blcolor[index];      fill(col, 80);      ellipse(x, y, size, size);     ellipse(x, y+2, size, size);   }   void update() {      speed = random(-20, 20);     x += speed * sin(angle);      y += speed;      angle += random(2, 10);      if (y > height) {
      y = 0;
    }

    if (y < 0) {       y = height;     }     if (x > width) {
      x = 0;
    }

    if (x < 0) {
      x = width;
    }
  }
}

class Jelly {
  float x; 
  float y; 
  float size;
  float speed;
  color [] jcolor = {
    #DDBBD9, #E8CBC0, #DAA3DC, #DCF297, #9BF6FD, #C6BDEA
  };  
  int col; 
  float angle; 

  Jelly(float px, float py, float s) {
    x = px; 
    y = py; 
    size = s; 
    speed = random(15, 45);
    col = #DAA3DC;
  }

  void render() {
    stroke(col);
    strokeWeight(1);
    noFill();
    ellipse(x, y, size, size);
    strokeWeight(1);
    ellipse(x, y, size/2, size/2);
    strokeWeight(1);
    ellipse(x, y, size/4, size/4);
  }

  void update(int jSize) {
    size = jSize; 
    x += speed * cos(angle*0.0003); 
    y += speed; 
    angle += random(1, 5); 

    if (x < 0) {       speed = -speed;        int index = int(random(0, jcolor.length));       col = jcolor[index];     }     if (x > width) {
      speed = -speed; 
      int index = int(random(0, jcolor.length));
      col = jcolor[index];
    }

    if (y < 0) {       speed = -speed;        int index = int(random(0, jcolor.length));       col = jcolor[index];       float rx = x;        float ry = y + 12;        ellipse(rx, ry, 20, 8);       ellipse(rx, ry, 100, 8);       ellipse(rx, ry, 200, 8);     }     if (y >= height) {
      speed = -speed; 
      int index = int(random(0, jcolor.length));
      col = jcolor[index];
    }
  }
}

class Wave { //makes bubbles that travel up 
  int x; 
  int y; 
  float speed; 
  int angle; 
  float size; 

  Wave(int xpos, int ypos, float s) {
    x = xpos; 
    y = ypos;
    speed = random(25, 45); 
    angle = 0; 
    size = s;
  }

  void make() {
    noFill();
    stroke(#BBEFF1, 70);
    strokeWeight(1);
    if (y < random(0, height/2)) {       y = height;        size = random(7, 20);     }     ellipse(x, y, size, size);   }   void update() {     x += speed * cos(angle);      y -= speed;      angle += random(10, 20);      if (size > 0) {
      size -= 0.2;
    }
  }
}