Composition – ITP Winter Show

Here is my process for creating the ITP Winter Show postcard.

I used a breadboard and some electrical wires to make the lettering.

After playing around with the lettering on grid paper, I realized that I wanted to use the ITP font (Gothic) so I reworked it to look as similar as possible to that type style.

Then I finally ended up with this concept after a lot of toying around with the color and different versions of the same kind of picture. (dreamhost is turning out to be nightmare host…they won’t let me upload any more pictures right now or else I would have shown the whole process).

Candy Machine

For this weeks assignment I made a candy machine that uses a potentiometer and a servo that dispenses the candy using a wheel attached to the servo.

2017-10-07 18.35.59 from Marco Wylie on Vimeo.

Here is the code:

#include
Servo myservo; // create servo object to control a servo
int potpin = 0; // analog pin used to connect the potentiometer
int val; // variable to read the value from the analog pin
void setup()
{
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}
void loop()
{
val = analogRead(potpin); // reads the value of the
// potentiometer (value between
// 0 and 1023)
val = map(val, 0, 1023, 0, 179); // scale it to use it with
// the servo (value between 0 and
// 180)
myservo.write(val); // sets the servo position according
// to the scaled value
delay(15); // waits for the servo to get there
}

It took a little finagling but eventually I was able to tape down the ramp to the cardboard in a way that would allow the wheel not to get caught when it spun. Once I had that in place I hot glued everything together. The only problem I ran into was similar to Oren’s problem last week. My potentiometer, when all the way to the left or right position would start to act out on it’s own. I contacted him to see if he had a solution but he said he didn’t and I was unable to rectify the problem myself.

The final result (with a few kinks):

2017-10-10 23.13.10 from Marco Wylie on Vimeo.

 

 

ICM Week 5

When trying to modify my bouncing ball to allow the balls to turn red when they touch each other I ran into an error that I can’t figure out.

Here’s the ball.js file:

class Ball {
constructor(x, y, xspeed, yspeed) {
this.x = x
this.y = y
this.xspeed = xspeed
this.yspeed = yspeed
}
run() {
this.update();
this.display();
}
update() {
this.xspeed = bounce(this.x, this.xspeed, 0, width);
this.x += this.xspeed;
this.yspeed = bounce(this.y, this.yspeed, 0, height);
this.y += this.yspeed;
}
display() {
ellipse(this.x, this.y, 50, 50);
}
this.changeColor = function() {
this.col = color(random(255), random(255), random(255));
}
this.intersects = function(other) {
let d = dist(this.x, this.y, other.x, other.y);
if (d < this.r * other.r) {
return true;
} else {
return false;
}
}
}

On line 24 (this.changeColor = function(){) I get an error “Class proprieties must be methods.” I have no idea what this means and I get it on line 28 as well.

Aside from that, here’s the homework for the week:

I made two circles (or eyes) move across the screen on the x axis and when you press any key it goes back to the left side of the screen.

let ball;
function setup() {
createCanvas(500, 400);
ball = new Ball();
}
function draw()
{
background(255);
if(ball.x > 400)
{
ball.stop();
}
ball.move();
ball.display();
}
function keyPressed()
{
ball.x = 0;
ball.speed = 2;
}
function Ball()
{
this.x = 0;
this.y = 200;
this.speed = 2;
this.c = color(153, 102, 51);
this.move = function()
{
if(this.x > width)
{
this.x = 0;
}
this.x = this.x + this.speed;
}
this.stop = function()
{
if(this.speed > 0)
{
this.speed = this.speed - 0.05;
} else {
this.speed = 0;
}
}
this.display = function()
{
fill(0);
ellipse(this.x + 20, this.y + 45, 40, 40);
ellipse(this.x + 80, this.y + 45, 40, 40);
}
}

 

 

 

pComp Week 4

This week I reviewed the material by creating a blinking led on a trum potentiometer that allows the led to blink faster or slower on a dimmer. The code was borrowed from here.

2017-10-04 01.39.24 from Marco Wylie on Vimeo.

And here is the code:
int sensorPin = 0;
int ledPin = 13;
void setup()
{
pinMode(ledPin, OUTPUT);
}
void loop()
{
int sensorValue;
sensorValue = analogRead(sensorPin);
digitalWrite(ledPin, HIGH);
delay(sensorValue);
digitalWrite(ledPin, LOW);
delay(sensorValue);
}

Week 4 – The Color Of Me

I found a color inspiration through West Side Story, the canals of Venice, Italy, and from some of my pictures on Instagram I took while traveling abroad in 2012. My main color scheme consists of an orangish red, a bright blue, black, venetian pink, and an off whitish yellow.

After playing around in Coolors.co I found the names of the colors in my palette that consists of the following:

Vermillion Red, Celestial Blue, Raw Sienna, Mustard, and Eerie Black

E83413, 4392CC, DE835C, FEC65B, 1B171F

 

Then I used a website called Pattern Cooler to create collages with the color palette.

 

ICM Week 4 – The struggle is real.

I’m trying to make a ball appear on the screen using my own functions with move() and display() but I’m running into a console error I can’t figure out.

let balls = [];
function setup() {
createCanvas(500, 400);
for (let i = 0; i < 4; i++) {
balls[i] = {
x: random(0,width),
y: random(0,height),
display: function() {
stroke(255);
noFill();
ellipse(this.x, this.y, 25, 25);
},
move: function() {
this.x = this.x + random(-1, 1);
this.y = this.y + random(-1, 1);
}
}
}
}
function draw() {
background(0);
for (let i = 0; i < balls.length; i++);
balls[i].move();
balls[i].display();
}

Console says Uncaught ReferenceError: i is not defined (sketch:line 26) which is this line of code:

for (let i = 0; i < balls.length; i++);

Since Dan moved on in his video to simplify, I will move on too…

Unfortunately, I ran into the same problem with the simplified code…

let balls = [];
function setup() {
createCanvas(500, 400);
for (let i = 0; i < 4; i++) {
balls[i] = new Ball();
}
}
function draw() {
background(0);
for (let i = 0; i < balls.length; i++); {
balls[i].move();
balls[i].display();
}
}
function Ball() {
this.x = random(0,width);
this.y = random(0, height);
this.display = function() {
stroke (255);
noFill();
ellipse(this.x, this.y, 25, 25);
}
this.move = function() {
this.x = this.x + random(-1,1);
this.y = this.y + random(-1,1);
}
}

It’s unbelievably annoying to move forward with the video’s we have to watch without being able to replicate the code sufficiently…let’s see if I can learn this stuff without recreating it at the same time I guess..

……..Now I’m really getting angry…I just tried to copy what dan was coding, verbatim, and I’m getting an uncaught type error in this code:
let bubbles = [];
function setup() {
createCanvas(600, 400);
for (let i = 0; i < 10; i++) {
let x = random(width);
let y = random(height);
bubbles.push(new Bubble(x,y));
}
}
function draw() {
background(0);
for (let i = 0; i < bubbles.length; i++)
bubbles[i].move();
bubbles[i].display();
}

I put that in the sketch.js folder, then I created another file named “bubble.js” and put the appropriate code there too…I cannot figure out why I can’t seem to get anything to show up today 4 hours into doing all this……..I’m losing my mind…taking a break now as I’m about to throw my computer across the room.

……………………………………………………………………………………………………..

Moving on from all that ’cause I still can’t figure it out.

For homework this week I took an old sketch and tried to rework it. Here’s the old one:

And the code:
let angle = 0
let x = 50
let y = 50
function setup() {
createCanvas(400, 400);
angleMode(DEGREES);
}
function draw() {
background(0);
translate(200, 200);
rotate(angle);
stroke(130);
line(0, 0, 50, 50);
rectMode(CENTER);
fill(255, 50, 20);
rect(x, y, 10, 10);
angle = angle + 2;
}

And after some more frustrating attempts — can’t get this to work either! Every single code I’ve done this weekend has not worked…now I’m starting to think that something is wrong with p5.js. None of the quiz answers I gave work, and I can’t figure out how to clean up this code and make the clock center itself.

When I take background and put it into the setup I see that the rotating line and square are actually drawing every time they move which means that if I add the background back to the draw function, it draws every time the line and square moves. But I still have no idea how to center it. 🙁

Here’s one code I ended up with:
let angle = 0
let x = 50
let y = 50
function setup() {
createCanvas(400, 400);
}
function draw() {
background(0);
angleMode(DEGREES);
translate(width/height);
rotate(angle);
stroke(130);
line(0, 0, 50, 50);
fill(255, 50, 20);
rect(x, y, 10, 10);
angle = angle + 2;
}

And here’s another code where I ended up with the same as above, I cannot center this damn thing:
let angle = (200,200);
let x = 50;
let y = 50;
function setup() {
createCanvas(400, 400);
angleMode(DEGREES);
}
function draw() {
background(0);
translate(moveCenter(), height/2);
rotate(angle);
stroke(130);
line(0, 0, 50, 50);
fill("red");
rect(x, y, 10, 10);
angle = angle + 2;
function moveCenter(pct) {
return width * pct/400;
}
}

Another thing I don’t understand is why, in the image below, “var painting = false” if you are indeed painting…I guess the language is confusing.

 

Week 3 – Typography & Expression

PLANE TICKET:

Sketches for the redesigned boarding pass:

I used Illustrator to start playing around with the information given:

I went through a lot of different designs before I came to what I think is the best one!

EXPRESSIVE WORDS:

I wish I could have had more time to put some of my ideas for expressive words into After Effects, but I’ve never used the program and I didn’t have enough time.

Here are some ideas I had that work well on paper as is. One of them I made a video of to give a little more animation to it. I also added a few sketches I had for words that would have worked better if I added animation to them.

2017-09-26 23.13.46 from Marco Wylie on Vimeo.

Reeperbahn Regular

(This is Reeperbahn font taken from here)

Below are some ideas I had:

pComp Week 3 – Digital i/o & Observation

Set up a digital out and in and created short vid about it:

2017-09-23 18.44.42 from Marco Wylie on Vimeo.

OBSERVATION:

For this weeks assignment I chose the Bedford L’s subway turnstile (although this observation applies to all of nyc’s subway turnstiles). I noticed that people generally flow through with their cards with ease when and if their cards work. The swiping function and whether or not a person has insufficient funds on their card determines the flow of the crowd. Whenever someone gets stuck swiping their card many times for lack of functional knowledge or whatever it may be, the crowd gets backed up. If this occurs during rush hour, the chaos it creates is stronger. People end up having to back out of the front of the turnstile, which leads to the line behind them having to awkwardly back up too. Not having enough money on your card could cause the same problem, backing up the flow.

I think this could be solved a few different ways. The MTA has already introduced an automatically refillable Metrocard, but this doesn’t get around the issue of swiping the card to fast and trying to go through only to awkwardly get jolted back by the turnstile. In other countries, take France for example, you put a small card through the top of the machine and it takes it and spits it out half a foot below and opens the doors to let you in. I think you can buy a card that allows you to just place it near a sensor that allows you to open the doors and proceed as well.

While observing the turnstile traffic at the L train on Bedford Ave, I noticed that the people who were the slowest were usually tourists trying to figure out how to position the Metrocard correctly or struggling with the rate of speed of the swipe. Being a native New Yorker, I’m very familiar with how to use the turnstiles, but that is not to say that I don’t ever hold up the line trying to swipe.

I’m guessing the way that the whole process works is that by registering the swipe of a Metrocard, a lever is released  which then allows you to go through the turnstile.

Assuming everything goes smoothly, the act that takes the least amount of time is going through the turnstile. Getting your metro card out, if you didn’t in advance, and swiping it takes the longest amount of time.

ICM – Week 3

I cannot for the life of me figure out why a code taken directly from Dan’s video (4.2) will not run. Here’s a screenshot of what’s going on:

Anyway, here’s the homework assignment for this week. I added a spiraling circle to the canvas:


function setup() {
createCanvas(640, 360);
}
function draw() {
background(255);
for (var y = 0; y < height; y += 20) {
for (var x = 0; x < width; x += 20) { if (random(1) > 0.5) {
line(x, y, x + 20, y + 20);
} else {
line(x, y + 20, x + 20, y);
}
}
}
noLoop();
}

Then I added an if statement to add a green background when the mouse is pressed.

And here’s the final result:

(This code was loosely based on a chapter of Getting Started with p5.js. p.135)

………………………………………………………………………………………………………………..

To change parts of my partners code I altered the background color, made the ellipses bigger and added a strokeWeight around each ellipse.

Here is the final result and code:

let x=0;
let y=0;
function setup() {
createCanvas(400, 400);
}
function draw() {
background(0);
if(mouseIsPressed){
background(210,0,random(150));
for(let x=mouseX; x<= width;x+=40){
for(let y=mouseY; y<= height; y+=40){
strokeWeight(2);
fill(random(200),random(200),0);
ellipse(x,y,50);
}
}
}
}