MEDA102 Coding Assignment 2

For this coding assignment I have drawn inspiration from the artist Vera Molnar and her work Computer Rosace Series ( This work demonstrates a series of squares within squares that have various iteration of rotation and line style. I found this work interesting because Molnar experiments with squares but creating an interesting visual aesthetic by the reducing the size of the iterations inwards. I wanted to experiement with this aesthetic as well as experiementing with colour. By creating a geometric shape and the rotations an interesting spiralling affect was formed.

To recreate this work I used techniques learnt in class as well as exploring the use of rotation and the effects of push matrix and pop matrix that create the visual effect. The iterations of the squares created an interesting dynamic. The colours are randomised but are also controlled by limiting the colour range as well as the number of colours that are used. Below is the outcome of the code as well as the code with the comments intergrated.


void setup() {
size(600, 600);

void draw() {
//determine the positioning, size and the rate in which the squares rotate. the number of squares is determined by Repetition
int a = (width/2);
int b = (height/2);
int s = 600;
int Rotation = 0;
int Degree = 3;
int Repitition = 90;
int rate = 2;
rectMode(CENTER); //determines starting point for where shape is drawn from

for (int i = 0; i <Repitition; i = i + 5) { // for loop determining shape repitition count
s = s – 30;
rotate(radians(Rotation)); // rotation formula for shapes
rect(0,0,s,s); //shape positioning and size
Rotation = Rotation + Degree; //rotation incrementation

s = s-rate; //shape size decrease increment


void Colour(){

int colour = 3;
int value = 4;
int [][] colArray = new int [colour] [value];

// increment loop in order to acheive new colour for each shape
for (int h = 0; h < colour; h++) {
for (int d = 0; d < value; d++) {

colArray[h][d]= (int)random(150) ; //colour range randomly chosen between 0 and 150


int colSelect = (int)random(colour); //sets random colour
fill(colArray[colSelect][0],colArray[colSelect][1],colArray[colSelect][2],colArray[colSelect][3]); //4 colours randomly used


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s