particledrawing

Particle Drawing

This is a little “drawer” that makes a particle circle that follows the mouse and when you click the mouse multiple circles with appear making a circle instead of particles follow the mouse. Along with the fade key you can make cool art.

Generative Drawer

Holding F will cause the fade to occur

if (keyPressed) {
if (key == 'f' ) {
blendMode(SUBTRACT);
fill(1);
rect (1, 0, width, height);
blendMode(BLEND);
} else {
fill(0);
}
}

This code is different to the open processing code due to it not being able to use blend modes.

Holding space  makes the trails appear and when you hold the mouse down it will change the trail.

 

Press S will take a screenshot of the display screen as a jpeg.

Pressing L will cause a line background to generate. To stop the lines press space.

if (keyPressed);
if (key == 'l') {
float z = random(-100, 640);
float w = random(-100, 640);
float zw = random(-100, 660);
point(z, w);
triangle(z, w, zw, z, w, zw);
noFill();
}

Pressing H will make a network of lines over the display. Which is the Thumbnail image.

if (keyPressed);
  if (key == 'h') {
    frameRate(30);

    float radius = width/2+50; // set radius of circle
    translate(width/2, height/2); // move the origin to the center
    for (int i = 0; i < num; i++) {
      float angle1 = random(0, TWO_PI); // set random number between 0 and 360
      float x1 = sin(angle1) * radius; // first point on circle
      float y1 = cos(angle1) * radius;
      float angle2 = random(0, TWO_PI);
      float x2 = sin(angle2) * radius; // second point on circle
      float y2 = cos(angle2) * radius;
      line(x1, y1, x2, y2); // line between first and second point
    }
    //  keyReleased;
  }

Pressing P will cause tiny dots to slowly cover the screen.

if (keyPressed);
 if (key == 'p') {
 float z = random(-100, 640);
 float w = random(-100, 640);
 frameRate(500);
 point(z, w);
 point(z, w);
 

Leave a Reply

Your email address will not be published. Required fields are marked *