Assignment 2- For Loop Function and Patterns

Projecting Kandinsky’s (1866-1944) idea of “Everything starts from a dot,” based on his famous Several Circles (1926) abstract painting, was my main inspiration behind this assignment.

© 2018 Artists Rights Society (ARS), New York/ADAGP, Paris

I started with the while loop to create an arrangement of pixels array but the system refused to run smoothly and kept on crashing and deleting my program. This pushed me into another direction wherein I restarted with the most basic designation of variables. The code that I ran drew circles on the screen, placed them randomly, and filled them with random colours.

Sketch 1- Random placement of circles

While the code ran smoothly, it kept on filling the screen with random circles till it became nothing but a resemblance of a big patchy ink blot. A certain level of symmetry became crucial at this point to prevent multiple circles  from just randomly overlapping each-other to fill the screen.

At this point I introduced the For loop in my code. The pre-assigned variables started creating a grid- like structure.  Since the random overlapping sequence kept on running within the code while the grid was running through the program, a very confused composition of circles developed on the canvas.

Sketch 2- Introduction of grids

In the code, I adjusted the x and y variables within the for loops so that the grid like structure could become uniform. It was a prolonged trial and error method but lastly the circles got adjusted within the height and the width of the canvas accurately.

Sketch 3- Uniform Grid

Later, I also added another loop to introduce rectangles and overlapped them over the circles to make the grid a bit more interactive and playful in terms of shapes and colours. The stroke as well as the random colours of the rectangles had to be adjusted so that the rectangles did not completely overshadow the circles. The final pattern came out as a surprise.

I also found the customisation of our own functions quite interesting. Not only did they allow me to organise my code into smaller chunks but also acted as uniform steps of a complicated task.

Here is the final playful product of the program,

 

In the future assignments I hope to include more interactivity with the usage of mouse, such as the movement of shapes across the screen. I also hope that I can include i.e place the graphic design within a certain boundary of a bigger shape or image that is on the screen. I also saw certain theorems that were projected through circles drawn on the screen in The Coding Train videos (9.8) and hope to initiate them through loops and functions as well. And last but not the least, I want to practice the functioning of loops more to create and manage designs that do not crash upon running.

 

 

 

My Self Portrait…

…and I am perhaps two different beings altogether!

Trying processing for the first time was definitely a handful of a task. I mainly envisioned my portrait as an amalgamation of basic geometric shapes and structures. And even though the final result was not an exact mirror reflection, the playful bits that were coded together did seem to capture the essence of the assignment. 

In the process, I found the positioning of codes quite crucial. I had to move back and forth a few times to ensure that the right shape was being overlaid by another. Also, making sure that each side was symmetrical to the other was another important bit. The values had to be adjusted time and again through trial and error to find the exact coordinates. For example, the eyebrows were the hardest feature on the face and took quite some time to be shaped via curves. 

To highlight a bit of my artsy side through this digital mode of expression, I put a small rose in my hair wherein I primarily interacted with concentric circles and arcs. I  further hope to build upon such ideas through the usage of spiral and other animations in the upcoming tasks.

But the portion of the code that turned out to be surprisingly well was when I mapped the eyes to lend the pupils movement. It just seemed to be a clever take on a “typical eye-roll” that we do while putting a lot of effort into a new task for the first time.

I really hope to learn more about other coding functions and their implementation so that I can further sharpen my skills to more clearly express my ideas in the future. Nonetheless, I am surprised by the content I could put up in my initial take on coding and self-portraiture.

Here it is,