Project 2 Experiment 3 – The Proper Way to Create a 2D Plot in Processing

The second experiment left me puzzled. Why did the code work on R but not on processing? The solution for the problem came in the form of an idea while I was taking a shower on the next day (I’m just mentioning this mundane detail to remind myself how the mind makes better connections and associations when it is not busy trying to find a solution for a problem). A few days before attempting to write that code in processing, I was taking a look at the libraries available for processing. One of them, grafica, was meant to be used to create 2d plots and at the time I thought I’d probably not use that library, so I just throwed this information to the back of my mind to be later retrieved.
With the grafica library, the code finally worked. I still can’t really understand why it didn’t work before, though. I played with different values for a, b, c, and d and got many different results. All of them were animated by adding a small value of randomness. The┬áchanges in the values have to be really small, otherwise the image might break.