Cindy-E

By Cindy Chi
/* CINDY CHI OCTOBER 3, 2008 DESMA 28: INTERACTIVITY Excercise E A drawing tool that sporadically draws transparent figures when mouse is clicked and not clicked. I wanted to create something that would allow the user to create a unique structural 3-dimensional space that could be layered (rectangular prisms) with a light touch of playfulness (small bubbles). The user may explore the many layers of the space, creating structured 3D shapes that seem to come out of the screen. The tiny circles come into the space as playful characters that swim around and weave in and out of the structures. When only using the bubbles the user is drawn toward a waterlike and flowy structure. When concentrating on using the blocks, the user is drawn toward a very structural drawing using only vertical, horizontal, and diagonal mouse movements. */ //SETUP CORNER COORDINATES FOR RECTANGULAR PRISMS float randlength = random(120); float corner1_2x = mouseX; float corner1y = mouseY; float corner2y = mouseY + 15; float corner3_4x = mouseX + randlength; float corner3y = mouseY - randlength + 15; float corner4y = mouseY - randlength; float corner5_6x = corner3_4x + 15; float corner5y = corner4y + 15; float corner6y = corner3y + 15; float corner7x = mouseX + 15; float corner7y = mouseY + 30; float corner8_9x = mouseX - randlength; float corner8y = mouseY - randlength + 15; float corner9y = mouseY - randlength; float corner10_11x = corner8_9x - 15; float corner10y = corner9y + 15; float corner11y = corner9y + 30; //RANDOM WIDTH/HEIGHT FOR CIRCLE BUBBLES float rand_wh = random(10); void setup() { size(400, 400); background(98, 179, 183); smooth(); } void draw() { //DRAWING RECTANGULAR PRISMS WHEN MOUSE IS CLICKED. if(mousePressed == true) { frameRate(5); //RESETS COORDINATES FOR NEW RANDOM# randlength = random(50); corner1_2x = mouseX; corner1y = mouseY; corner2y = mouseY + 15; corner3_4x = mouseX + randlength; corner3y = mouseY - randlength + 15; corner4y = mouseY - randlength; corner5_6x = corner3_4x + 15; corner5y = corner4y + 15; corner6y = corner3y + 15; corner7x = mouseX + 15; corner7y = mouseY + 30; //RIGHT RECTANGULAR PRISM stroke(191); fill(255, 30); quad(corner1_2x, corner1y, corner1_2x, corner2y, corner3_4x, corner3y, corner3_4x, corner4y); fill(255, 60); quad(corner3_4x, corner4y, corner3_4x, corner3y, corner5_6x, corner6y, corner5_6x, corner5y); fill(255, 120); quad(corner1_2x, corner2y, corner7x, corner7y, corner5_6x, corner6y, corner3_4x, corner3y); //LEFT RECTANGULAR PRISM stroke(91); randlength = random(50); //RESETTING RANDOMNESS corner1_2x = mouseX; corner1y = mouseY; corner2y = mouseY + 15; corner7x = mouseX + 15; corner7y = mouseY + 30; corner8_9x = mouseX - randlength; corner8y = mouseY - randlength + 15; corner9y = mouseY - randlength; corner10_11x = corner8_9x - 15; corner10y = corner9y + 15; corner11y = corner9y + 30; fill(0, 120); quad(corner1_2x, corner1y, corner1_2x, corner2y, corner8_9x, corner8y, corner8_9x, corner9y); fill(0, 60); quad(corner8_9x, corner8y, corner8_9x, corner9y, corner10_11x, corner10y, corner10_11x, corner11y); fill(0, 30); quad(corner1_2x, corner2y, corner7x - 30, corner7y, corner10_11x, corner11y, corner8_9x, corner8y); } //DRAWING CIRCLES IF MOUSE IS NOT CLICKED else { frameRate(20); stroke(255, 100); fill(98, 179, 183, 100); ellipse(mouseX, mouseY, rand_wh, rand_wh); rand_wh = random(10); } }

One Comment

  1. Posted October 16, 2008 at 10:09 am | Permalink

    Interesting contrast between architectural elements and the circles. I think I understand why the frame rate was set low, but it makes it unresponsive in terms of drawing feedback.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*