# Digital Innovation Design

I have taken up Digital Innovation design as m summer course and as interesting the name sounds its gonna be exhausting as well because an entire semester’s work has been compressed into a 6 week course! And if this wasn’t tiring enough, we have to learn coding using Java Script!

On our first class we wrote a code to make an image of a bicycle. Honestly it was a bit confusing but it was very interesting. We used Processing as our medium to code.

Here is the code that we wrote in the class

void setup() {
size(800, 600); // this is the canvas size
background(255, 206, 13); // background color
fill(3, 3, 23); // this is ellipse fill
noStroke();

float firstWheelX=width*(1.0/3.0); // this is the circle one
float wheelY=300;
float secondWheelX=width*(2.0/3.0);
float gearX=width/2.0;

ellipse(firstWheelX, wheelY, 100, 100);
ellipse(secondWheelX, 300, 100, 100);

stroke(3, 3, 23);
strokeWeight(5);
line(gearX, wheelY, gearX-20, wheelY+20); // pedal #1
line(firstWheelX, topTube, secondWheelX, topTube); // frame
line(firstWheelX, topTube, gearX, wheelY);
line(secondWheelX, topTube, gearX, wheelY);

fill(160, 32, 240);

ellipse(gearX, wheelY, 25, 25);

noStroke();
rect(firstWheelX-20, topTube-45, (secondWheelX-firstWheelX)/3.0, 10);
stroke(3,3,23);
line(gearX, wheelY, gearX+20, wheelY-20); // pedal #1
}

This is how it turned out to be, This might not look impressive but giving the limited time we had and adding to that making sure every body is in the same page, this was pretty good. We were were given an assignment at the end of the class to code our own bike. We I was a bit nervous but after many trials and looking at the tutorials, I came up with this one:

void setup(){
size(800,600);
background(255);
noStroke();
float firstWheelX = width*(1.0/3.0);
float wheelY = 300;
float secondWheelX = width*(2.0/3.0);
float wheelDiameter = 100;
float arcDiameter = 125;
float topTube = wheelY-(wheelDiameter/2.0)-30;
float gearX = width/2.0;
//wheels
fill(255,0,0);
strokeWeight(0);
ellipse(firstWheelX,wheelY,wheelDiameter,wheelDiameter);
ellipse(secondWheelX,wheelY,wheelDiameter,wheelDiameter);
fill(255,255,255);
//rim
strokeWeight(4);
stroke(200,200,200);
ellipse(firstWheelX,wheelY,wheelDiameter-20,wheelDiameter-20);
ellipse(secondWheelX,wheelY,wheelDiameter-20,wheelDiameter-20);
//innercircles
strokeWeight(4);
fill(0,0,0);
ellipse(secondWheelX,wheelY,wheelDiameter-75,wheelDiameter-75);
ellipse(firstWheelX,wheelY,wheelDiameter-75,wheelDiameter-75);
strokeWeight(4);
stroke(0,0,255);
line(firstWheelX, wheelY, gearX,wheelY);//framebottom
line(firstWheelX, wheelY, firstWheelX+95, topTube+50);//seatconnector
line(firstWheelX+36, topTube, secondWheelX-70,topTube);//seatconnector
line(secondWheelX, wheelY, secondWheelX-30,topTube-50);//handleconnector
line(secondWheelX-30,topTube-50, secondWheelX-60,topTube-50);//handle
line(firstWheelX,topTube-30,gearX,wheelY); //slant line connecting to seat
line(secondWheelX-30,topTube-50,gearX,wheelY);// slant line connecting gear
noFill();
arc(secondWheelX-30,topTube-62,40,25,PI+HALF_PI, TWO_PI+HALF_PI);
fill(9,121,26);
ellipse(gearX,wheelY,25,25);// gear
rect(firstWheelX-10,topTube-30,(secondWheelX-firstWheelX)/5.0,10);
stroke(17,62,100);
line(gearX,wheelY, gearX-20,wheelY+20);
line(gearX-20,wheelY+20, gearX-5,wheelY+20);//frontpedal
}

Though it is not as impressive but somehow it gave me satisfaction after completion. But I know this is just the start and there are lot to learn and I would like to end this blog with a quote from Robert Frost.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.