/*
* Rachel Griswold
* rgriswol@andrew.cmu.edu
* Section B
* Project 05
*
*/
var v1x = -300;
var v1y = -70;
var v2x = -100;
var v2y = -110;
var v3x = 0;
var v3y = -300;
var v4x = 100;
var v4y = -110;
var v5x = 300;
var v5y = -70;
var v6x = 160;
var v6y = 90;
var v7x = 190;
var v7y = 300;
var v8x = 0;
var v8y = 210;
var v9x = -190;
var v9y = 300;
var v10x = -160;
var v10y = 90;
x0 = 80;
y0 = 60;
x02 = 160;
y02 = 140;
x03 = 130;
y03 = 110;
function setup() {
angleMode(DEGREES);
createCanvas(600, 730);
}
function draw() {
background(42, 38, 64);
noStroke();
fill(72, 40, 62);
ellipse(400, 140, 300, 200);
ellipse(300, 200, 400, 200);
ellipse(440, 250, 300, 150);
ellipse(175, 600, 300, 200);
ellipse(230, 550, 300, 200);
ellipse(300, 600, 400, 200);
ellipse(350, 550, 200, 200);
fill(254, 254, 164);
rotate(3);
for (var q = 0; q < 600; q += 200){
for (var i = 0; i < 600; i += 250){
beginShape();
vertex((v1x/10) + x0 + q, ((v1y/10) + y0)+i);
vertex((v2x/10) + x0 + q, ((v2y/10) + y0)+i);
vertex((v3x/10) + x0 + q, ((v3y/10) + y0)+i);
vertex((v4x/10) + x0 + q, ((v4y/10) + y0)+i);
vertex((v5x/10) + x0 + q, ((v5y/10) + y0)+i);
vertex((v6x/10) + x0 + q, ((v6y/10) + y0)+i);
vertex((v7x/10) + x0 + q, ((v7y/10) + y0)+i);
vertex((v8x/10) + x0 + q, ((v8y/10) + y0)+i);
vertex((v9x/10) + x0 + q, ((v9y/10) + y0)+i);
vertex((v10x/10) + x0 + q, ((v10y/10) + y0)+i);
endShape();
}
}
for (var q = 0; q < 600; q += 200){
for (var i = 0; i < 900; i += 250){
beginShape();
vertex((v1x/10) + x02 + q, ((v1y/10) + y02)+i);
vertex((v2x/10) + x02 + q, ((v2y/10) + y02)+i);
vertex((v3x/10) + x02 + q, ((v3y/10) + y02)+i);
vertex((v4x/10) + x02 + q, ((v4y/10) + y02)+i);
vertex((v5x/10) + x02 + q, ((v5y/10) + y02)+i);
vertex((v6x/10) + x02 + q, ((v6y/10) + y02)+i);
vertex((v7x/10) + x02 + q, ((v7y/10) + y02)+i);
vertex((v8x/10) + x02 + q, ((v8y/10) + y02)+i);
vertex((v9x/10) + x02 + q, ((v9y/10) + y02)+i);
vertex((v10x/10) + x02 + q, ((v10y/10) + y02)+i);
endShape();
}
}
for (var q = 0; q < 600; q += 200){
for (var i = 0; i < 900; i += 250){
beginShape();
vertex((v1x/20) + x03 + q, ((v1y/20) + y03)+i);
vertex((v2x/20) + x03 + q, ((v2y/20) + y03)+i);
vertex((v3x/20) + x03 + q, ((v3y/20) + y03)+i);
vertex((v4x/20) + x03 + q, ((v4y/20) + y03)+i);
vertex((v5x/20) + x03 + q, ((v5y/20) + y03)+i);
vertex((v6x/20) + x03 + q, ((v6y/20) + y03)+i);
vertex((v7x/20) + x03 + q, ((v7y/20) + y03)+i);
vertex((v8x/20) + x03 + q, ((v8y/20) + y03)+i);
vertex((v9x/20) + x03 + q, ((v9y/20) + y03)+i);
vertex((v10x/20) + x03 + q, ((v10y/20) + y03)+i);
endShape();
}
}
noLoop();
}
For this project I really wanted to create something to do with the night sky/space, because I love clothes with those kinds of patterns. I started with the sketches below. Being able to create the stars ended up being… considerably harder than I thought, but I think I learned a lot from it.