# ass­e­s­s­m­e­n­t 1

• Show Sketch
``````/** Background Research
Going into this assignment I knew I wanted to experiment with the random() function in the application of altering the opacity of shapes. I was inspired by the designs on page 17 of the online book Type + Code: Processing For Designers by John Corrigan (https://issuu.com/jpagecorrigan/docs/type-code_yeohyun-ahn). In which the designer has used the single letter 'T' repeated multiple times at varying sizes and opacities. I found a pattern of shapes that I liked on the website http://natureofcode.com/book/chapter-8-fractals/ in Example 8.2 which I then combined with some excerpts of code from the various tutorials on peepproject.com. The aim was to have each circle with a different fill/opacity that then changes every time the code is run.

/** @peep sketchcode */
void setup()
{
size (400, 400);
background(0);
drawCircle(width/2, height/2, 200);
}

void drawCircle(float x, float y, float radius)
{
stroke(255);
fill(0, r*10, r);

int r = random(width/10);
strokeWeight(r/5);

//Code adapted from http://natureofcode.com/book/chapter-8-fractals/ and then altered to change opacity of circles.
//drawEllipse() - Runs twice. For every circle that is drawn, two smaller circles (with half the radius of the circle before) are drawn   one on each side of the circle.
//Continues until the radius is <=2
{
drawCircle(x + radius/2, y, radius/2); //drawCircle() - runs twice. For every circle that is drawn two smaller circles are drawn one     on each side of the circle
}
}

//Reflection on outcomes
//Initially things went very badly and when trying to merge the two codes I ended up creating a continuous animation where the outlines of the circles flashed to a degree that I feel it would have the ability to trigger epilepsy it was that bad. From there I managed to stop the flashing and make the outlines of the circles randomly change in thickness every time the code is run. It was not what I had hoped my final design would be able to accomplish but I didn't manage my time very well this week with the two other assessments I had due. I am a little concerned that my design may be too simple in terms of the code used but for me it is at a level where I understand everything that is happening in the code and can follow it which I am quite proud of as I have been really struggling with getting my head around this course.``````