The Actual Code :
PImage p0, p1, p2, p3, p4;PImage [] pixArray = new PImage [5];void setup() {
size(800, 600);
p0 = loadImage(“1.png”);
p1 = loadImage(“2.png”);
p2 = loadImage(“3.png”);
p3 = loadImage(“4.png”);
p4 = loadImage(“5.png”);
pixArray[0] = p0;
pixArray[1] = p1;
pixArray[2] = p2;
pixArray[3] = p3;
pixArray[4] = p4;
background(255);
imageMode(CENTER);
}void draw() {
// background(255);
}void mousePressed() {
for (int i=0; i<20; i++)
image(pixArray [int (random(pixArray.length))], random(width), random(height), random(200, 500), random(100,360));
}}
0 comments:
Post a Comment