mabedk / AP2017

All the work done in and for Aesthetic Programming classes at Aarhus University, 2nd semester of Digital Design.
0 stars 0 forks source link

Mini-Exercise 2 Feedback #1

Closed MagnusJMJ closed 7 years ago

MagnusJMJ commented 7 years ago

The program displays a grid of perfectly identical grey circles. A single circle draws the viewer's attention - it is red as blood. Above the grid, black text reads: /"CLICK THE ERROR AND TURN THE PIECE INTO PERFECTION - IT MIGHT TAKE A FEW TRIES"/. Clicking with the mouse button makes the red circle change into another, seemingly random colour. Once the circle is grey like the others, clicking has no effect.

Looking at the code, much of the space is taken up by the draw() function being told to draw all the circles.


//circle 1 - line 1
    ellipse(50, 100, 100, 100);  

//circle 2 - line 1
    ellipse(155, 100, 100, 100); 

//circle 3 - line 1
    ellipse(260, 100, 100, 100);

Oddly, the rebellious red circle is being called already in setup() instead of draw(). I have no idea why.

function mouseClicked() {
if (farve == 0) {
    noStroke();
    fill(0, 255, 0);
    ellipse(680, 415, 100, 100);
    farve = farve + 1;
    } else if (farve == 1) {
    noStroke();
    fill(0, 0, 255);
    ellipse(680, 415, 100, 100);
    farve = farve + 1;
    } else if (farve == 2) {
    noStroke();
    fill(250);
    ellipse(680, 415, 100, 100);
    farve = farve + 1;
    }
}

Finally, the mouseClicked() function is used to make the circle change its colour. Looking at the code, it seems the program draws a different color circle on top of the previous one each time the mouse is clicked. The circle goes through a hard-coded sequence of colours, and is not random, as I previously thought! Bamboozled again.

The program appeals to an innate desire for order and symmetry. The red circle is an annoyance in an otherwise perfect pattern - an /error/. It does a good job at reflecting how often, to solve an error (especially in programming, I think) one must grasp out at several semi-random solutions, and suddenly it just works and nobody knows why. I like the relatability of the program - both in terms of how it annoys, and how it solves the problem. The code is neat and easy to understand. The only suggestions for improvement I can make are these:

All things considered, it's a really neat program you made!

mabedk commented 7 years ago

Thank you Mag-to-the-nus! I didn't know about the functions for placing a circle several times (mind = blown) so that's definitely helpful! And neither did I know about switch - I'll definitely try them out!

And the reason the rebel of the circles is called in setup is to avoid it looping! If it wasn't placed in setup, the red circle would be placed above the other circles in mouseClicked();. Took me basically five years to figure this out lolz.

Thx thx thx