top of page
Search

Repetition

Updated: Jul 16, 2020

After a Tutorial marathon I decided to take a break from coding for a couple of days. Now I think I am ready to take on the Assignment for this week. Wish me luck!



We will not be using “draw” in Processing, only “setup”. We will only work to create plain images.


I started by copying the codes from the script and trying to understand how they worked. The two first ones: easy!


IRREGULARITIES AND RANDOMNESS IN REPETITION


I decided to bring in some color to the Excercise and to make the "black sheep" actually black. Here was the first one:

I wanted to make the black circle bigger, which was very easy. I thought. What I always forget!!! is to define the color before the object:

But I had only drawned a bigger circle over the small one! So in order for me to understand it better, I decided to change the position of the black sheep and also make it bigger:


After that I tried to change the colors of three dots:



Random


The next Excercise is to change the colors randomly of the bubbles.


And a little bit more edited:

I am loving this!!! I finally feel like I understand it!


This one was even easier because I only added the int size to the last coding aaaaand this happened:

If I add a xsize and a ysize instead of only size this happened:

I decided to stick to the red and did a random color definition only using reds:

And this one looks almost like a galaxy:



Optical Art


Another function is introduced. This map function may be very useful, and the codes are actually very short!

This was the first code on the script:


void setup(){

size(800,800);

for (int i=700; i>1;i=i-10){

fill(255-map(i,700,1,255,0)); //”map” is explained below

ellipse(400,400,i,i);

}

}

>> The “map” function maps values from one range to another. In our code, i is a variable that goes down (we see a “decrement”) from 700 to 10, in steps of 10. With the “map” function, we take the current value of i, and transform it such that the values decrease from 255 to 0, instead of from 700 to 10.<<


So what IS exactly i?

I had to read the codes and the text a couple of time in order to understand.

Is a variable that determines the minimum and maximum value.


The first excercise was ok to do. It definetely helped to have the codes on the script:


Now I added the random stroke:


Recap Optical Art


So before I started with the Assignment for next week, I decided to refresh the things I learned the week before. I started experimenting with colors.

This was my first excercise:


This looks actually very simple (it was) but it took me a little while to realize that you have to define for every RGB value a map funtion. In this case it was only from blue to red that is why I wrote this fill(255-map(i, 700, 1, 255, 0),0,map(i, 700, 1, 255, 0));


The next one was more like a series of the same thing, and created an interesting Background:

I decided to take try and do the next assginment... Here I go :/

 
 
 

Comments


© 2020 by Maria Guzman. Proudly created with Wix.com.

bottom of page