Making a Cup in Processing



To make this red soda cup, follow this relatively simple code:


void setup() {
  size(1000, 1000);
  background(255, 208, 88);

}

void draw() {
  fill (226, 40, 40);
quad (200, 300, 700, 300, 600, 900, 300, 900);
quad (200, 300, 700, 300, 600, 900, 300, 900);
fill (255, 254, 254);
quad (190, 280, 190, 300, 710, 300, 710, 280);
fill (255, 254, 254);
quad (615, 280, 625, 70, 610, 70, 600, 280);
quad (232, 500, 666, 500, 650, 600, 248, 600);
}

- Sheryl

Comments