top of page
Writer's pictureCaren Wenqing Ye

Week4: function&loops

This week we learned how to make repetitive items with simple lines of code and to modulate code by making up "function" so that we can clearly see what each code is doing for certain programs.

For example:

if we want to draw a row of ellipse with flashing colors (using "random")

for (var x=0;  x<width; x=x+50) {

fill ( random(255),0,random(255) );

ellipse (x,100,10,10)

we can also do something to make a pattern for both x and y axis

for (var x=0;….)

   for (var y=0;…..)


I made the sketch based on the basics of functions, loops and random. I got fascinated by the geometric patterns created with "loops&random color" which reminds me of the music by Shanghai Restoration Project, an electronic music duo based in Brooklyn. I hope to explore more about how music and visuals can work together.







3 views0 comments

Recent Posts

See All

Final Assignment

For the final assignment, I made an audio visual instrument in p5.js, using keyboard to generate both sound and visuals, and I also...

Comments


bottom of page