Tuesday, May 3, 2016

VIDEO

We have used specific x and y positions for the robot to complete a sequence of movements that will allow it to pick up and object and "throw" it away in the correct "garbage bin". We will have to retrieve two cups and possibly stylize them accordingly yet. The video below shows each sequence; one for paper and one for plastic. The third and fourth toggle are for manual control and then a home, or base, position.


UI PROCESS

We have been able to effectively use a few toggles already. Tee has wonderfully put together a simple background, title, and logo. 






Sunday, May 1, 2016

FINAL PROJECT UPDATE

Tee and I have made a lot of progress on our project. We not only altered our idea a little, but we had a meeting about coding and other details, which we needed clarification on. That meeting helped a ton.
From that meeting, we took away knowledge on how to format and then customize the code to our project. We were able to hook up our robot right away and make sure the movements were smooth and consistent.
So far we have added details for color and the overall layout of our UI. We also have made all our buttons. We still need to make adjustments on the specific movements we will have the robot make. So far it is looking good and we're proud of our work. I can say a week ago we were not as excited about it as we are now.


 

Friday, April 22, 2016

PROJECT PROPOSAL --

What Tee and I want to do with our robot is conduct it to either draw or write something. We started off with thinking we could program it to draw out certain letters according to that key being pressed on a keyboard. 
We do not plan on programming the whole alphabet, but with that concept in mind we had an idea of programming steps to draw a shape. Still wanting to include buttons, we came up with using knobs as a way of free drawing. There will be a couple pre-set images so that if that icon is pressed, the robot will know what to do. The knobs will be there as an option. Then we will try and include sliders for additional functions -- probably for background color. 


The top sketch shows the orientation of it. Firstly, it was obvious to want the robot to hold the pen or pencil downward and write normally, however, thanks to Brian we discovered the mapping of the robot for its tasks could get complicated and tricky. 
I think for both simplicity and the fun of how it will look, we will somehow have the pen on its side and the robot can write on and easel or something of that nature. 

Sunday, March 20, 2016

BUTTONS -- Practice (Explained)

So my goal for this project was to create more of an abstract design. I wanted to place rectangles of different sizes around my sketch. The plan was to have the rectangles be the buttons. If you click a button (rectangle), you change the background of the sketch. The buttons would already be different colors so you'd be able to tell what you would get out of it; except a shade lighter or darker. I ran into trouble with this, so what I had down (not finished) wasn't able to load. But I saved that and thought I'd post it anyways.

BUTTONS -- Practice

import controlP5.*;

ControlP5 buttons;

//?
int myColor = 255;

void setup(){
  size(600,600);
  
  //object referring to itself
  buttons = new ControlP5(this);
  
  buttons.addButton("one")
  //what you get
  .setValue(45,121,53)
  .setPosition(10,10)
  .setSize(50,50)
  .setColorBackground(color(34,98,40,15))
  //when you hover
  .setColorForeground(color(68,134,75,15))
  //text
  .setColorLabel(color(255))
  //when you click
  .setColorActive(color(68,134,75,15))
  ;

  buttons.addButton("two")
  .setValue(1,103,2)
  .setPosition(40,30)
  .setSize(100,400)
  .setColorBackground(color(3,131,3,15))
  .setColorForeground(color(20,167,21,15))
  //text
  .setColorLabel(color(255))
  //when you click
  .setColorActive(color(20,167,21,15))
  ;

  buttons.addButton("three")
  .setValue(91,180,98)
  .setPosition(10,70)
  .setSize(400,100)
  .setColorBackground(color(60,152,67,15))
  .setColorForeground(color(91,201,99,15))
  .setColorLabel(color(255))
  .setColorActive(color(91,201,99,15))
  ;
  
  
}

void draw(){
  background(myColor);
}

//?
void one(int c){
  myColor = c;
}
void two(int c){
  myColor = c;
}
void three(int c){
  myColor = c;
}

Wednesday, February 24, 2016

float h;
float p;

void setup(){
  size(500,500);
  background(255);

}

void draw(){
 noStroke();
 strokeWeight(0);
 //sunset
 fill(50,50,70);
 rect(0,0,65,500);
 fill(120,90,130);
 rect(62.5,0,65,500);
 fill(190,100,140);
 rect(125,0,65,500);
 fill(255,90,120);
 rect(187.5,0,65,500);
 //sunset
 fill(250,227,98);
 rect(250,0,65,500);
 fill(250,220,121);
 rect(312.5,0,65,500);
 fill(242,250,144);
 rect(375,0,65,500);
 fill(89,209,165);
 rect(437.5,0,65,500);

   
   h -= hour() + (float(minute())/60) + ((float(second())/60)/10);
   if(h < -1){
   h = 1;
   
   
   float p = map(h,0,23,0,width-(width/8));
 }

 println(hour() + (float(minute())/60) + ((float(second())/60)/10));

 sunflower(width/2,height/2);

}

void sunflower(int x,int y){
   //x = location
   //y = location


   //pedals
   pushMatrix();
   translate(x,y);
   scale(h,1);
   fill(240,255,36);
   for(int i = 0; i <= 10; i ++){
   rotate(radians(360/10));
   ellipse(0,-50,35,100);
   }
   fill(193,148,62);
   ellipse(0,0,75,75);
   popMatrix();
   
}


BACKGROUND UPDATE // TIME

I've updated the sky, and the code is different from what I posted yesterday. I've now incorporated 'hours' and it works in my sketch, which in itself seems like a miracle to me. Because the flower will only move from one side to the next over a whole day, you can't tell if it's actually working by just staring at it. You can't tell any immediate change. I added println() and there is in fact change.

Below is the new code for the sky.

Tuesday, February 23, 2016

BACKGROUND

Here is some code I was working on today for the background of my clock. Having the "sky" change color is obviously more realistic than it being white 24 hours/day.

Saturday, February 20, 2016

FOCAL POINT

I've created the flower that spins and I am struggling but still trying to set up code that will spin it according to the time of day. I've also tried connecting the stem to it, but that ended up a little funky too; I think I placed that code in the wrong area.


float f;

void setup(){
  size(500,500);
  background(255);
}

void draw(){
 background(255);

   f -= .01;
   if(f < -1){
   f = 1;
 }
  
 sunflower(width/2,height/2);
}

void sunflower(int x,int y){
   //x = location
   //y = location

   //pedals
   pushMatrix();
   translate(x,y);
   scale(f,1);
   fill(240,255,36);
   for(int i = 0; i <= 10; i ++){
   rotate(radians(360/10));
   ellipse(0,-50,35,100);
   }
   fill(0);
   ellipse(0,0,75,75);
   popMatrix();

}

Wednesday, February 17, 2016

SUNFLOWER

A start to my sunflower, clock sketch -- with much help. I'm still trying to figure out how to draw the flower, and below are some images on curves, which I am also trying to understand. The problem really is not how it is done, but how I am actually going to draw the flower. There are a lot of parts and figuring out coordinates may not be that easy...same with attaching the flower to the moving stem. 












CLOCK1

I've started a simple clock idea. There will be 12 bars that load vertically to represent hours. Each bar is cut into thirds for 20 minute markers and the bars will fill according to the time. Obviously, time will not be represented so specifically. 

I want to continue working on this one as well as my other idea with the sunflower. 







Monday, February 15, 2016

CLOCK pt1

I've been doing some sketching and thinking about how I want my clock to look like. I've come up with what I think is a pretty basic idea. I want to get started on it right away and I've attached below a picture of my thoughts. Time will be indicated by a bar.


A couple other ideas I was thinking of was creating a sketch of something natural that helps tell time. The most obvious would be the sun and moon, however, my sketch wouldn't be able to show the exact time; the viewer would just get a general idea. 


The other, which I think is really cool is creating a sketch of a sunflower. I want to pursue this idea as well as my first one. Sunflowers track the sun and even at night, by the time the sun comes up again, they are facing East. I think it would be really cool to have the sunflower's movement be the representation of what time it is. Again, it wouldn't be able to show the exact time, but the idea is a bit more creative. 


Saturday, January 30, 2016

INTERACTION INFLUENCE

This is a previous code/design I did and so when I got this current assignment, I definitely thought of new ideas, but this one was very similar to the new code I wanted to get down. This work below helped me a lot just by refreshing my memory. Ex. If, then statements




INTERACTION FINAL



Friday, January 22, 2016

//HOAN BRIDGE PROCESS







//HOAN BRIDGE FINAL

//Hoan Bridge Sketch

size(600,600);
background(172,207,247); //blue

textSize(60); //font size
textAlign(CENTER);
fill(0); //black
text("HOAN",width/2,400);
fill(126); //grey
text("BRG",width/2,450);
fill(255); //white
text("MKE",width/2,500);

fill(255,218,8); //yellow
stroke(255,218,8); //stroke color = yellow
ellipse(500,100,100,100); //"sun"

stroke(0); 
strokeWeight(3); //thickness
fill(172,207,247); //blue; same as background
arc(300,300,300,200,-PI,0);

stroke(0); //black
line(0,250,width,250); //bridge base

line(130,300,0,250);
line(150,300,130,300);

line(470,300,600,250);
line(450,300,470,300);