Kristine Kim- Project 03- Dynamic-Drawing

sketch

var radx = 200;
var rady = 200;
var anglet = 0;
var angless = 0;
var angles = 0;
var anglem = 0;
var angleb = 0;
var anglebb = 0;


function setup() {
    createCanvas(640, 480);
    noStroke();  
}

function draw() {
//background color changing depending on the placment of the mouse
    background(mouseX,mouseY, 200);
// creating the 4 ellipses 
    fill(mouseX, 245, 127);
    ellipse(width/4, height/2,radx,rady);
    fill(mouseX, 245, 127);
    ellipse(width/2, height/4,rady,radx);
    fill(mouseX, 245, 127);
    ellipse(width/1.33, height/2,radx,rady);
    fill(mouseX, 245, 127);
    ellipse(width/2, height/1.33,rady,radx);
//This code transforms the 4 ellipses
    if (mouseX > width/2){
        radx = 50 + (width/2 - mouseX);
    }else {
        radx = 50 + (width/2 - mouseX);
    }
/*6 squares, all different sizes rotating either clockwise or
counter clockwise based on the left top corner of the squares*/

//rotating the smallest square, color stays the same
    fill (23, 0, 173);
    push();
    translate(mouseX, mouseY);
    rotate(radians(anglet));
    rect(0,0,25,25);
    pop();
    anglet = anglet + 12

//rotating smaller square , color stays the same
    fill(255, 55, 0);
    push();
    translate(mouseX,mouseY);
    rotate(radians(angless));
    rect(0,0,60,100);
    pop();
    angless = angless - 12;

//rotating small square, color changes with the mouse
    fill (150, mouseX, mouseY);
    push();
    translate(mouseX,mouseY);
    rotate(radians(angles));
    rect(0,0,90,150);
    pop();
    angles = angles + 10;

//rotating medium square, color changes with the mouse
    fill (200, mouseY, mouseX);
    push();
    translate(mouseX, mouseY);
    rotate(radians(anglem));
    rect(0,0,140,140);
    pop();
    anglem = anglem - 10; 


//rotating bigger square, color changes with the mouse
    fill(mouseY, mouseX, 250);
    push();
    translate(mouseX,mouseY);
    rotate(radians(angleb));
    rect(0,0,170,170);
    pop();
    angleb = angleb + 8;

//roating biggeest square, color changes with the mouse
    fill(mouseX,140, mouseY);
    push();
    translate(mouseX,mouseY);
    rotate(radians(anglebb));
    rect(0,0,200,200);
    pop();
    anglebb = anglebb -8;
}

This project was a little bit more challenging for me but definitely made me more interested in this class and coding for art in general. I started by creating an ellipse and making it change the height and the width(shape/size) with the mouse movement. Then added more element and abstraction with the rotating squares and rectangles.

Margot Gersing – Project 03 – Dynamic Drawing

I really enjoyed combining different skill we have learned so far into this project. I started off using radial rotation which was fun to experiment with. I also utilized ‘easing’ which I think adds another level of interest to it.

Margot-dynamicdrawing

// Margot Gersing - Project 03 - Section E - mgersing@andrew.cmu.edu

// easing circle variables 
var cx = 100;
var cy = 100;
var diffx = 0;
var diffy = 0;
var targetX = 100;
var targetY = 100;

function setup() {
	createCanvas(480, 640);
	rectMode(CENTER);
}

function draw(){
	background(1, 58, 111);

	// BACK RECTANGLES
	// rectangle's y position follows mouseY
	fill(186, 216, 227); //light blue
	rect(width / 2, mouseY, width, 300);

	// rectangle's x position follows mouseX
	fill(253, 145, 83); //orange
	rect(mouseX, height / 2, 100, height);

	// CIRCLE
	noFill();
	stroke(255);
	strokeWeight(10);

	// circle follows mouse with an ease of 0.1
	diffx = mouseX - cx;
    diffy = mouseY - cy;
    cx = cx + 0.1 * diffx;
    cy = cy + 0.1 * diffy;
    ellipse(cx, cy, 250, 250);

	noStroke();

	// if mouse is on the left side of screen fill outer rectangles with yellow
	if (mouseX < width / 2) {
		fill(255, 185, 65); //yellow
	}

	// if mouse is on the right side of screen fill outer rectangles with dark green
	if (mouseX > width / 2) {
		fill(22, 88, 51); //dark green
	}

	// OUTER RECTANGLES
	// six rectangles evenly rotated around center on circle with radius of 180
	// size controlled by mouseX / 2 and mouseY / 2

	translate(width/2, height/2);
	for (var i = 0; i < 6; i++) {
		push();
		rotate(TWO_PI * i / 6);
		rect(180, 0, mouseX / 2, mouseY / 2);
		pop();
	}

	// if mouse is in the bottom part of screen fill inner rectangles with purple

	if (mouseY < height / 2) {
		fill(150, 71, 98); //purple
	}
	
	// if mouse is in the top part of screen fill inner rectangles with red
	if (mouseY > height / 2) {
		fill(255, 104, 62); //red
	}

	// INNER RECTANGLES
	// six rectangles evenly rotated around center on circle with radius of 50
	// size controlled by mouseX / 3 and mouseY / 3

	for (var i = 0; i < 6; i++) {
		push();
		rotate(TWO_PI * i / 6);
		rect(50, 0, mouseX / 3, mouseY / 3);
		pop();
	}
}

Gretchen Kupferschmid-Project 03- Dynamic Drawing


sketch

var angle = 0;

function setup() {
    createCanvas(480,640);
}
 function draw (){
    background(500 - mouseY, 128, 224);
    //ellipse grows big and changes color
    noStroke();
    fill(800-mouseY, 400-mouseX, 15);
    ellipse(width/2, height/2, mouseX, mouseX);
    //line rotates with mouse and color changes
    push();
    translate(width/2, height/2);
    rotate(radians(mouseX/3));
    strokeCap(ROUND);
    strokeWeight(50);
    stroke(147, 190, 500-mouseX);
    line(10,10 ,mouseX, mouseY);
    pop();
    //line 1 rotate clockwise and change color
    push();
    translate(mouseX, mouseY);
    rotate(radians((angle+.5)*2));
    strokeCap(ROUND);
    strokeWeight(50);
    stroke(500-mouseX, 154, 158);
    line(10,10 ,50, 100);
    pop();
    //line 2 rotates counterclockwise and change color 
    push();
    translate(mouseX, mouseY);
    rotate(radians((angle+.5)*-2));
    strokeCap(ROUND);
    strokeWeight(50);
    stroke(220, 500-mouseX, 158);
    line(10,10 ,50, 100);
    pop();
    //line 3 rotates fastest and changes color 
    push();
    translate(mouseX, mouseY);
    rotate(radians((angle+.5)*5));
    strokeCap(ROUND);
    strokeWeight(50);
    stroke(220, 150, 500-mouseX);
    line(10,10 ,50, 100);
    pop();

     
    angle = angle +.5;
 }

Nawon Choi— Project-03 Dynamic Drawing

nawon-project-3

// Nawon Choi
// Section C
// nawonc@andrew.cmu.edu
// Project-03 Dynamic Drawing

var angle = 0;

function setup() {
    createCanvas(480, 640, WEBGL);
}

function draw() {
    background("#001c2e");

    // revolving objects
    push();
    rotate(radians(angle));
    noStroke();
    fill(250);
    ellipse(150, 150, 20, 20);
    pop();
    angle += 5 * (mouseX * 0.005);

    if (mouseY > 160 & mouseY < 320) {
        push();
        rotateX(radians(angle));
        noStroke();
        fill("purple");
        ellipse(0, 300, 10, 10);
        pop();
        angle += 0.5 * (mouseX * 0.00001);
    } else if (mouseY > 320 & mouseY < 480) {
        push();
        rotateY(radians(angle));
        noStroke();
        fill("green");
        ellipse(200, 0, 15, 15);
        pop();
        angle += 0.5 * (mouseX * 0.00001);
    } else if (mouseY < 160) {
        push();
        rotateY(radians(angle));
        noStroke();
        fill("blue");
        ellipse(200, 0, 20, 20);
        pop();
        angle += 0.5 * (mouseX * 0.00001);
    } else {
        push();
        rotateX(radians(angle));
        noStroke();
        fill("yellow");
        ellipse(0, 300, 10, 10);
        pop();
        angle += 0.5 * (mouseX * 0.00001);
    }

    // from p5.js reference "directionalLight()"
    // https://p5js.org/reference/#/p5/directionalLight
    let dirX = (mouseX / width - 0.5) * 2;
    let dirY = (mouseY / height - 0.5) * 2;

    var colorR = mouseX / 2;
    var colorG = mouseY / 3;

    directionalLight(250, 250, 250, -dirX, -dirY, -1);

    // draw sphere
    noStroke();
    sphere(150, 150);

    rotateX(mouseY * -0.01);
    rotateY(mouseX * -0.01);
    rotateZ(mouseY * 0.01);
    cylinder(200, 10);

    // fill("white");
    // ellipse(5, 5, 10, 10);



}

For this project, I tried to keep it simple and also experiment with elements that I haven’t used before, which are 3D shapes. I originally played around with boxes and light. The directionalLight() function had a really interesting effect, which I thought it would look better on a circular object. I decided to use spheres and cylinders instead, and have the light be controlled by the mouse position. I also added some circles to revolve around the object (speed controlled by mouse) to add to the “planet” look.

Shannon Ha – Project 03 – Dynamic Drawing

sketch

//Shannon Ha
//Section D
//sha2@andrew.cmu.edu
//Project - 03: Interactive Drawing

var diam1 = 50; //diameter of
var diam1a = 70;//
var speedcircle = 1;//speed of circle
var dir = 1;// direction of pulsing circle
var angle = 0; // angle of rotation
var speedangle = 0.2
var lineAX = 200;
var lineAX2 = 100
var lineAY = 175;
var diam2 = 135;
var diam3 = 200

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

}

//top-right ellipse
function draw() {
  background(0);
  fill(220, mouseX/2, mouseY/2);
  ellipse(70, 70, diam1, diam1);
    diam1 += dir * speedcircle/2;
    if(diam1 > 150){
      dir = -dir;
      diam1 = 150;
    }
    else if(diam1 < 0){
      dir = -dir;
      diam1 = 0;
    }

//mouse ellipse
  fill(0);
  push();
  ellipse(mouseX, mouseY, mouseX+1, mouseX+1);
    fill(246,mouseX,mouseY);

  //middle ellipse
  ellipse(200,240,diam2,diam2);

  diam2 += dir * (speedcircle + 2);

  if(diam2 > 300){
    dir = -dir;
    diam2 = 300;
  }
  else if(diam2 < 0){
    dir = -dir;
    diam2 = 0;
  }

//left-most ellipse
  ellipse(470,190,mouseX/2,mouseY/2);
  noStroke();
  fill(200,0,mouseX/2);
  if (mouseX/2 <= diam3/2){
    mouseX = 30;
  }

  if (mouseY/2 <= diam3/2){
    mouseY = 30;
  }

//spinning lines
  stroke(0,250,mouseY);
  strokeWeight(5);
  push();

  translate(mouseX, mouseY);
  rotate(mouseX/2 || mouseY/2);
  line(lineAX,lineAY,lineAX2,lineAY);
  line(lineAX+40,lineAY+40,lineAX2+40,lineAY+40);
  line(lineAX-50,lineAY-50,lineAX2-50,lineAY-50);
  line(lineAX-20,lineAY-20,lineAX2-20,lineAY-20);

  pop();






}

For this weeks project, I wanted to create a dynamic drawing that resembled fireworks, however, I struggled a lot to make the lines move, so I decided to simplify it to just ellipses instead.

Kimberlyn Cho- Project03

I was inspired by the static of a TV to create my dynamic drawing. I took into consideration the size of the static, rotation of the dials, position of the slider, degree of static, and colors to make my drawing dynamic in accordance to the position of the mouse.

ycho2-03

/* Kimberlyn Cho
Section C
ycho2@andrew.cmu.edu
Assignment-03 */

/* directions:
move vertically = vary length of static controlled by the slide
move horizontally = vary color and level of static controlled by the dials */

var screenW = 360
var screenH = 300
var rectW = 10
var rectH = 20
var angle = 0

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

function draw() {
    background(256, mouseX, mouseY);
    rectMode(CENTER);

    //antenna
    stroke("pink");
    strokeWeight(5);
    line(320, 95, 370, 10);
    line(320, 95, 250, 5);
    strokeWeight(0);
    fill("white");
    ellipse(320, 95, 100, 50);

    //tv
    fill("pink");
    rect(320, 280, 500, 380, 50);
    fill("white");
    rect(290, 280, 380, 320, 30);

    //tv controls
    ellipse(525, 175, 50, 50);
    ellipse(525, 250, 50, 50);
    fill("pink"); 
    //rotating dials
    push();
    translate(525, 175);
    rotate(radians((angle + 20) + mouseX / 2));
    rect(0, 0, 40, 10);
    pop();
    push();
    translate(525, 250);
    rotate(radians(-angle + mouseX / 2));
    rect(0, 0, 40, 10);
    pop();
    //slider
    fill("white");
    rect(525, 360, 6, 136);
    var slider = constrain(mouseY, 292, 428);
    rect(525, slider, 25, 25);

    //tv screen
    fill("black");
    rect(290, 280, screenW, screenH);
    
    //to imitate static
    var color = random(0, 255);
    //to constrain static heights within screen
    var length = constrain(mouseY, 130, 430);
    var staticH = height - length;

    //static
    fill(200);
    translate(110, 130);
    fill(color, mouseX, color);
    rect(screenW * 0.02, screenH / 2, rectW, staticH * .3);
    rect(screenW * 0.06, screenH / 2, rectW, staticH * .8);   
    rect(screenW * 0.10, screenH / 2, rectW, staticH * .6);
    rect(screenW * 0.14, screenH / 2, rectW, staticH * .4);
    rect(screenW * 0.18, screenH / 2, rectW, staticH * .7);
    rect(screenW * 0.22, screenH / 2, rectW, staticH * .3);
    rect(screenW * 0.26, screenH / 2, rectW, staticH * .5);
    rect(screenW * 0.30, screenH / 2, rectW, staticH * .8);
    rect(screenW * 0.34, screenH / 2, rectW, staticH * .4);
    rect(screenW * 0.38, screenH / 2, rectW, staticH * .3);
    rect(screenW * 0.42, screenH / 2, rectW, staticH * .6);
    rect(screenW * 0.46, screenH / 2, rectW, staticH * .7);
    rect(screenW * 0.50, screenH / 2, rectW, staticH * .8);
    rect(screenW * 0.54, screenH / 2, rectW, staticH * .5);
    rect(screenW * 0.58, screenH / 2, rectW, staticH * .7);
    rect(screenW * 0.62, screenH / 2, rectW, staticH * .6);
    rect(screenW * 0.66, screenH / 2, rectW, staticH * .4);
    rect(screenW * 0.70, screenH / 2, rectW, staticH * .4);
    rect(screenW * 0.74, screenH / 2, rectW, staticH * .2);
    rect(screenW * 0.78, screenH / 2, rectW, staticH * .3);
    rect(screenW * 0.82, screenH / 2, rectW, staticH * .5);
    rect(screenW * 0.86, screenH / 2, rectW, staticH * .7);
    rect(screenW * 0.90, screenH / 2, rectW, staticH * .6);
    rect(screenW * 0.94, screenH / 2, rectW, staticH * .8);
    rect(screenW * 0.98, screenH / 2, rectW, staticH * .4);

}

Sarah Choi – Project 03 – Dynamic Drawing

project-03

//Sarah Choi 
//Section D
//sychoi@andrew.cmu.edu
//Project-03-Dynamic-Drawing

//spiral
var angle = 0;
var bright = 255;
var n = 0;
var m = 0;
var x = 8 * n;
var y = 8 * m;

function setup() {
    createCanvas(640, 480);
    rectMode(CENTER);
}

function draw() {
    noStroke();
    if (mouseIsPressed) {
        bright = 255;
    }
    background(bright);
    bright = bright - 5;

    fill(255, 0, 0);
    var m = max(min(mouseX, 200), 20);
    var size = m * 200.0 / 250.0;
    rect(10 + m * 150.0 / 350.0, 400.0,
         size, size);
    fill(0, 0, 255);
    size = 200 + size;
    circle(150, 50 + m * 150 / 250.0,
         size / 2, size / 2);

    push();
    fill(0, 255, 0);
    ellipseMode(CORNER);
    var n = max(min(mouseX, 300), 200);
    var size2 = n * 200.0 / 400.0;
    ellipse(400 , size2, size2 * 2, size2 * 4);
    pop();
    
    if (mouseIsPressed) {
        fill(255, 255, 0);
        noStroke();
        strokeWeight(5);
        translate(mouseX, mouseY);
        rotate(radians(10));
        triangle(100, 0, 150, 150, 175, 150);
        quad(175, 150, 150, 150, 200, 200, 250, 200);
        triangle(200, 200, 250, 200, 150, 450);
        angle = angle + 5;

        push();
        translate(mouseX, mouseY);
        rotate(radians(10));
        triangle(300, 0, 275, 150, 250, 150);
        quad(275, 150, 250, 150, 300, 200, 350, 200);
        triangle(300, 200, 350, 200, 250, 450);
        pop();
        angle = angle + 5;

        push();
        translate(mouseX, mouseY);
        rotate(radians(10));
        triangle(25, 0, 0, 50, -25, 50);
        quad(0, 50, -25, 50, 45, 100, 75, 100);
        triangle(45, 100, 75, 100, 25, 250);
        pop();
        angle = angle + 5;
    }

    if (x <= width) {
        n += 1;
        bezier(x+2, y+2, x, y+6, x+2, y+8, x+4, y+6, x+2, y+2);
    }
    else { 
        m += 1;
        bezier(x+2, y+2, x, y+6, x+2, y+8, x+4, y+6, x+2, y+2);
    }
}

I was inspired by the weather. After playing around, I was able to come up with the code where when the mouse is pressed, the background inversed and slowly went back to normal. This reminded me of a flash of lightning, which is what I wanted to convey in my project.

Yoshi Torralva – Project 03 – Dynamic – Drawing

sketch

// Yoshi Torralva
// Section E
// yrt@andrew.cmu.edu
// Project 03

var x = 40; //  x height of plaid
var y = 40; //  y height of plaid
var dx = 0; //diagonal var / width
var dy = 40; //diagonal var / height 

function setup() {
    createCanvas(480, 640);
}
function draw() {
    background(mouseX, mouseY, 0); // changes color
//thread to the left and right 
//conditional reactive to the mouse 
if(mouseX > 0) {
    x = mouseX;
}
//conditional reactive to the mouse 
if(mouseX < 200) {
    x = mouseX;
}
//conditional reactive to the mouse 
if(mouseY > 0) {
    y = mouseY;
}
//conditional reactive to the mouse 
if(mouseY < 200) {
    y = mouseY;
}
var bxscale = constrain(mouseX, 40, 100); // scale of ellipse
var byscale = constrain(mouseY, 40, 100); // scale of ellipse 
// plaid banners — layered 
    push();
    noStroke();
    fill(187, 0, 0);
    rect(0, 40, x, 40);
    fill(0, 136, 85);
    rect(160, 0, 40, y);
    fill(0, 136, 85);
    rect(40, 0, 40, y); 
    fill(0, 136, 85);
    rect(160, 0, 40, y);
    fill(34, 68, 51);
    rect(100, 0, 40, y);
    fill(187, 0, 0);
    rect(0, 100, x, 40);
    fill(187, 0, 0);
    rect(0, 160, x, 40);
    fill(34, 68, 51);
    rect(100, 0, 40, y);
    fill(187, 0, 0);
    rect(0, 220, x, 40);
    fill(34, 68, 51);
    rect(220, 0, 40, y);
// thin gold layering 
    fill(170, 102, 0);
    rect(0, 40, x, 10);
    fill(170, 102, 0);
    rect(40, 0, 10, y); 
    pop();
// push and pop used for strokeWeight only
    push();
    stroke(color(255));
    strokeWeight(10);
    line(mouseX, mouseY, 0, 0); // top left line 
    line(mouseX, mouseY, 480, 640); // bottom right line 
    fill("white");
    ellipseMode(CENTER);
    noStroke();
    ellipse(mouseX, mouseY, bxscale, byscale); // ellipse that moves to mouseX/Y
    pop();
}

With this project, I wanted to use the interaction of the mouse to create a plaid pattern. The rectangles react to the mouse and the white lines serve as a visual guide to imply that the mouse is weaving the plaid together. The background alternates color and the cursor shifts scale diagonally.

Charmaine Qiu – Project 03 – Dynamic Drawing


sketch

Exploring the various ways that shapes in p5js can change with the movement of the cursor was really interesting! It was also interesting to incorporating text in different languages into my code.

/* Charmaine Qiu
   Section E
   charmaiq@andrew.cmu.edu
   Project-03-DynamicDrawing */


var angle = 0
var b = 0


function setup() {
    createCanvas(400, 400);
}

function draw() {
//square that follows the cursor
    fill(b);
    b = random (0, 255);
    strokeWeight(0);
    rectMode(CENTER);
    push();
    translate(mouseX, mouseY);
    background(0);
    rotate(radians(angle));
    rect(0, 0, 50, 50);
    pop();
    angle += 5;

//rectangle outlines in the center
    noFill();
    stroke(255);
    strokeWeight(5);
    push();
    translate(width / 2, height / 2);
    rect(0, 0, mouseX, mouseY);
    pop();

    stroke(b);
    strokeWeight(1);
    rect(width * 0.5, height * 0.5, mouseY, mouseX);

//dancing lines in the center
    stroke(255);
    strokeWeight(1);
    line(width / 2 - 40, height / 2, width / 2 - 40, mouseY + 50);
    line(width / 2 - 30, height / 2, width / 2 - 30, mouseY);
    line(width / 2 - 20, height / 2, width / 2 - 20, mouseY - 20);
    line(width / 2 - 10, height / 2, width / 2 - 10, mouseY + 40);
    line(width / 2, height / 2, width / 2, mouseY);
    line(width / 2 + 10, height / 2, width / 2 + 10, mouseY + 60);
    line(width / 2 + 20, height / 2, width / 2 + 20, mouseY + 10);
    line(width / 2 + 30, height / 2, width / 2 + 30, mouseY);
    line(width / 2 + 40, height / 2, width / 2 + 40, mouseY - 30);

//When the mouse move to the left side of the canvas
    if (mouseX <= width / 2){
      push();
      translate(mouseX - 50, mouseY - 50);
      rotate(radians(angle));
      rectMode(CORNER);
      rect(20, 20, 20, 20);
      pop();
      angle = angle + 0.5;

      push();
      translate(mouseX + 50, mouseY + 50);
      rotate(radians(angle));
      rect(0, 0, 10, 10);
      pop();
      angle = angle - 0.5

      //text
      textSize(15);
      text('WooHooo!!!', 20, 90);
      textSize(30);
      text('哦耶!', 280, 180);

    } else { //When the mouse move to the right side of the canvas
      fill(0);
      strokeWeight();
      push();
      translate(mouseX, mouseY);
      rotate(radians(angle));
      rectMode(CENTER);
      rect(0, 0, 30, 30);
      pop();
      angle = angle + 5

      //text
      textSize(20);
      fill(255);
      text('야호!', 280, 50);
      textSize(25);
      text('ヤッホ〜ー', 70, 350);

    }


}

Caroline Song – Project 03 – Dynamic Drawing

sketch

//Caroline Song
//Section E
//chsong@andrew.cmu.edu
//Project 03 - Dynamic Drawing

var speed = 3;
var distX = 0;
var distY = 1;
var rectX = 300;
var rectY = 300;
var rectWidth = 50;
var rectHeight = 300;

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

function draw(){
//change background color when mouse cursor is on lower half of canvas
    if(mouseY > height/3){
        background(255, 96, 71);
       } else{
       background ("black");
       }

//constantly moving yellow rectangle
    rect(rectX, rectY, rectWidth, rectHeight);
    fill(245, 236, 66);
    noStroke();
    rectX = rectX + distX * speed;
    rectY = rectY + distY * speed;

    if (rectY >= height){
        rectY = -rectHeight;
    }

//when mouse pressed, shapes change from circle to rectangle. 
//shapes will also change colors
    push();
    if(mouseIsPressed){

        //yellow rectangle following mouse cursor when mouse pressed
        rectMode(CENTER);
        rect(mouseX, mouseY, 100, 100);
        fill(245, 149, 66);
        noStroke();

        //blue rectangle when mouse pressed
        rectMode(CENTER)
        rect(400 - mouseX, 300 + mouseY, 75, 75);
        fill(66, 135, 245);
        noStroke();

        //purple rectangle when mouse pressed
        rectMode(CENTER);
        rect(width/2 + mouseX, height/2 - mouseY, 300, 300);
        fill(188, 66, 245);
        noStroke();

        //orange rectangle when mouse pressed
        rectMode(CENTER);
        rect(480, 400, 60, 60);
        fill(245, 236, 66);
        noStroke();

        //yellow rectangle in corner when mouse pressed
        rectMode(CENTER);
        rect(0, 0, 300, 300);
        fill(71, 255, 169);
        noStroke();

    } else {

        //yellow circle
        ellipse(mouseX, mouseY, 200, 200);
        fill(66, 245, 135);
        noStroke();

        //pink circle
        ellipse(400 - mouseX, 300 + mouseY, 300, 300);
        fill(232, 152, 245);
        noStroke();

        //blue circle
        ellipse(width/2 + mouseX, height/2 - mouseY, 100, 100);
        fill(152, 245, 228);
        noStroke();

        //orange circle
        rectMode(CENTER);
        rect(480, 400, mouseX, mouseY);
        fill(245, 236, 66);
        noStroke();

        //yellow rectangle
        rectMode(CENTER);
        rect(0, 0, mouseX, 300);
        fill(71, 255, 169);
        noStroke();

    }
    pop();

}

Coming up with an idea for my dynamic drawing was one of the most challenging parts for me, because there seemed to be so many things to choose from that I didn’t know where to start. However, once I began, I decided to focus on how shapes can interact and flow together in a single piece, creating my final dynamic drawing.