cchau1 – Project05 – Wallpaper


var w = 60; //adjusts the spacing between seeds
var h = 60; //adjusts vertical distance between seeds
var spaceY = 30; //y-circle offset
var spaceX = 30; //x-circle offset
var rad; //radius of circle component of "seed"
var wid; //width of rectangle component of "seed"
var x = 1;
var y = 1;
var columns;
var spacing = 10; //for the white lined grid-feature

function setup() {
    createCanvas(480, 480);

    for (var x = 0; x < height; x++) {
    } //this creates the white lines on the pink watermelon flesh
  //wanted to maintain the "square grid" feature in the corners of the
  //watermelon flesh so I subtracted from the canvas dimensions

    noStroke(); //colors of the rind
    rect(0,height-40, width, height);

    var rowChange = 7;
    for (var row = 0; row < 6; row++) {
      if(row%2==0) {
        rad = 10;
        w = 420/7;
        spaceX = 60;
        wid = 5;
        columns = 7;
      } else{
        rad = 24;
        w = 60;
        spaceX = 30;
        columns = 8;
        wid = 12;

//loop draw the "seeds" and depending on the row #, will alternate
      for (var col = 0; col < columns; col++){
        var py = spaceY + row * h;
        var px = spaceX + col * w;
        console.log(px, py);
        ellipse(px, py,rad);
      } //the combination of a square on top of an ellipse creates
        //the shape of a "seed"



function draw() {

I decided to go for a design that would be more like an entire motif rather than small objects. I had other ideas to do things such as leaves or flowers but after having Founder’s Day for CMU constantly surrounding me, I chose to go for something more quirky: a watermelon. I had some struggle creating the perfect seed “shape” but got a little more creative by overlaying the square on top of the ellipse (using math). I didn’t want to add too much detail since I was going for a more minimalist approach: seeds, rind, and for added “texture”, a loop of rectangles that also crossed to create an eye-catching “grid” design in the corners of the flesh (if you look closely at watermelon, you will see these little white veins).

honeydew version


Leave a Reply