# How to make particles with tails on the picture

**URL:** https://discourse.processing.org/t/how-to-make-particles-with-tails-on-the-picture/24941
**Category:** Coding Questions
**Tags:** homework
**Created:** [October 27, 2020, 8:56am UTC](https://discourse.processing.org/t/how-to-make-particles-with-tails-on-the-picture/24941 "2020-10-27T08:56:37Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![AbleYudada](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ableyudada/32/14190_2.png) [@AbleYudada](https://discourse.processing.org/u/AbleYudada)
#### Post date: [October 27, 2020, 8:56am UTC](https://discourse.processing.org/t/how-to-make-particles-with-tails-on-the-picture/24941/1 "2020-10-27T08:56:37Z")

</div>

Hi. I want to know how to make particles with tails on the picture? I try to do this. But it not work. 😖

---

<div class="post-metadata">

### Author: ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)
#### Post date: [October 27, 2020, 1:52pm UTC](https://discourse.processing.org/t/how-to-make-particles-with-tails-on-the-picture/24941/2 "2020-10-27T13:52:49Z")

</div>

searching on google should help you find what you are looking for. This is just one way of doing it.

```auto
int i = 0;

void setup(){
  size(500,500);
  smooth();
  noStroke();
  background(255);
}

void draw(){
  fill(255,25);
  rect(0,0,width,height);
  fill(0);
  ellipse(width/2 + i,height/2 + i,50,50);
  delay(100);
  i+=10;
}

```

take a look at the examples provided in the processing ide there is an example of how to make trails like this one, I just cant remember the name of it. Alternatively you would have to create an array or arraylist of a certain size to store the positions of whatever you are drawing and use the array to draw the shape you want.

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [October 27, 2020, 1:54pm UTC](https://discourse.processing.org/t/how-to-make-particles-with-tails-on-the-picture/24941/3 "2020-10-27T13:54:35Z")

</div>

I agree. Your question is too broad. We don’t know whether they are birds or from a firework or fountain

---

<div class="post-metadata">

### Author: ![AbleYudada](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ableyudada/32/14190_2.png) [@AbleYudada](https://discourse.processing.org/u/AbleYudada)
#### Post date: [November 24, 2020, 4:16am UTC](https://discourse.processing.org/t/how-to-make-particles-with-tails-on-the-picture/24941/4 "2020-11-24T04:16:20Z")

</div>

Thanks bro! I got it.

---

<div class="post-metadata">

### Author: ![AbleYudada](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ableyudada/32/14190_2.png) [@AbleYudada](https://discourse.processing.org/u/AbleYudada)
#### Post date: [November 24, 2020, 4:23am UTC](https://discourse.processing.org/t/how-to-make-particles-with-tails-on-the-picture/24941/5 "2020-11-24T04:23:18Z")

</div>

```auto
/**
 * Transparency. 
 * 
 * Move the pointer left and right across the image to change
 * its position. This program overlays one image over another 
 * by modifying the alpha value of the image with the tint() function. 
 */

PImage img;
float offset = 0;
float easing = 0.05;

void setup() {
  size(640, 360);
  img = loadImage("moonwalk.jpg"); // Load an image into the program 
}

void draw() { 
  if(frameCount%5 == 0)
  {
  fill(255,25);
  rect(0,0,width,height);
  }
  println(frameRate);
  image(img, mouseX, mouseY,50,50); // Display at full opacity
  //float dx = (mouseX-img.width/2) - offset;
 // offset += dx * easing; 
  //tint(255, 127); // Display at half opacity
 // image(img, offset, 0);
}

```

I changed some codes and this is the effect I want

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [November 24, 2020, 8:46am UTC](https://discourse.processing.org/t/how-to-make-particles-with-tails-on-the-picture/24941/6 "2020-11-24T08:46:22Z")

</div>

So, is this solved now?

Congratulations!
