Purple Rain (Assessment 2)-

Artist statement:

Focused on repetition and variation of mass production, I looked at the way in which knitting, although repeats the same steps or code can turn out differently once a stitch is dropped or added, adding variation to the piece. My sketch adds to the motion of repetition, repeating the same action, yet set to random in order to get the variation of colour, size and position of each ball.

My idea came from trying to get a ball to bounce by adding gravity and speed while my other idea focused on creating multiple balls that would continuously travel down the screen, off and start again. Trying to mash two codes together proved difficult, as one idea wanted one thing and one wanted another. I stuck with creating repetition and variation of the balls floating down the screen, off and starting again. This adds to the effect of variation through the balls being set to random in order to capture the repeated task of the balls travelling down the screen.

The particular sketch explores the idea of floating bubbles which are translucent to show the amount of balls and variation being used. The repetition is visibly displayed in this sketch.

Screen Shot 2015-09-28 at 10.43.26 am Screen Shot 2015-09-28 at 10.44.30 am Screen Shot 2015-09-28 at 10.43.03 am

Code Used:

//This sketch uses a class, used to make multiple balls act on their own.

int numBalls=180; //This is the number of balls used which are put into the array

ball [] balls = new ball [numBalls];   //this is the array where all the balls are put in.

void setup(){




for (int x=0;x<balls.length;x++){ //The determines the position of balls in the array

balls[x]= new ball(); //creates a new ball using class



void draw(){

background(255); //clear the screen each frame

for (int x=0;x<balls.length;x++){ // objects in the array follow the fuctions below

balls[x].ballsdraw();  // Each ball placed in the ball array is called on from the method ballsdraw()

balls[x].move();  // move each ball in the array using the method move();



class ball{  //Class used to create each object before being put into the array

int x; // elements of each object in the class

int y;

int speed;

int size;

color c;

ball(){ //this is the ‘constructor’ – called to create a new ball or object

x = (int)random(width);

y = (int)random(width);

size = (int)random(80,100);

speed = (int)random(8,10);

c = color((int)random(130),(int)random(25),(int)random(180),(int)random(120));


// below are methods – like functions used for each and all of the objects of the class

void ballsdraw(){   // Called every frame to draw a ball




void move(){  //this function moves the balls down the screen- When it reaches the bottom it moves across the screen (right) // then it resets all the values

if (y+size/4 < height){

y += speed;

} else if (x-size/4 < width)  {

x += speed;

y += speed;

} else {

x = (int)random(width);

size = (int)random(80,100);

y = 0-size/2;

speed = (int)random(8,10);




References- Code used:

A simple bouncing ball- OpenProcessing. 2015. A simple bouncing ball- OpenProcessing. [ONLINE] Available at: http://www.openprocessing.org/sketch/67284. [Accessed 28 September 2015].

 Parallax bubbles- OpenProcessing. 2015. Parallax bubbles- OpenProcessing. [ONLINE] Available at: http://www.openprocessing.org/sketch/163034. [Accessed 28 September 2015].


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s