float[] xPos = {0.0, 100.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000}; float[] yPos = {0.0, 100.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0}; int p = -40; void setup() { size(1500, 1000); smooth(); noStroke(); } void draw() { noLoop(); background(#ffffff); // set centre point for (int i = 0; i < xPos.length; i++){ for (int u = 0; u < yPos.length; u++){ flower(xPos[i],yPos[u]); } } println(mouseX,mouseY); } void flower(float x, float y){ float r = random(100,255); float g = random(100,255); float b = random(100, 255); fill(r,g,b); for (int p = 0; p < 5; p++) { ellipse(x, y-18, 25, 25); ellipse(x+18, y-3, 25, 25); ellipse(x-18, y-3, 25, 25); ellipse(x-11, y+18, 25, 25); ellipse(x+11, y+18, 25, 25); } // centre circle fill(#fff9bb); // light yellow ellipse(x, y, 20, 20); }
float[] xyPos = {0.0, 100.0,200.0,300.0,400.0,500.0,600.0,700.0,800.0,900,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000}; float[] yPos = {0.0, 100.0,200.0,300.0,400.0,500.0,600.0,700.0,800.0}; void setup(){ size(1500,900); background(0); noStroke(); } void draw(){ background(#32FA19); for (int i = 0; i < xyPos.length; i++){ for (int u = 0; u < yPos.length; u++){ loud(xyPos[i],yPos[u]); frameRate(10); xyPos[i] = xyPos[i]+random(2); if (xyPos[i]>2000){ xyPos[i]=0; } if(keyPressed){ background(0); } } } } void loud(float x,float y){ noLoop(); float growth=millis()/500; float r = random(255); float g = random(255); float b = random(255); float alpha = random(255); loop(); fill(r,g,b,alpha); circle(x,y,growth); }
Q1: In the reading “Art, Interaction and Engagement” by Ernest Edmonds, he identifies four situations in an interactive artwork: ‘Static’, ‘Dynamic-Passive’, ‘Dynamic-Interactive’ and ‘Dynamic-Interactive(Varying)’. From the exercise you did today which situations you identify in every part you executed? Explain.
“Static: The art object does not change and is viewed by a person.”
The flowers are static because they do not move or change. Once the code is ran, the color, and location of the flowers are consistent.
“Dynamic-Passive: The art object has an internal mechanism that enables it to change or it may be modified by an environmental factor such as temperature, sound or light.”
The circles are dynamic-passive because they move to the right based on an internal instruction.
“Dynamic-Interactive: All of the conditions of the dynamic passive category apply with the added factor that the human ‘viewer’ has an active role in influencing the changes in the art object.”
In the circle example, it is dynamic-interactive because the user can turn off the movement of the circles by pressing a key.
Q2: What is the benefit of using arrays? How might you use arrays in a potential project?
Arrays are beneficial because they are a quick way of making a pattern or complex line of code concise. In game design they can be used to quickly draw characters or backgrounds.
Leave a Reply