Transparency in background Processing vs P5.js

Hi there,
I wanted my moving particles to leave a trail.
In “The coding train” I noticed that this can me done in P5.js by calling “background(0,20);”
20 Being the transparency of the background.
This does not work in Processing. Can this be solved in another way?
Another way of leaving a trail is by storing the last positions in an array and draw them again but that would make my program slow.

code in P5.js leaving a trail :
var x = 0.0;
var y = 0.0;
function setup () {
createCanvas(900, 900);
noStroke();
}

function draw() {
background(0, 20);
x += 1;
y += 1;

fill(255);
circle (x, y, 10);
}

code in Processing leaving no trail :
float x = 0.0;
float y = 0.0;
void setup () {
size(900, 900);
noStroke();
}

void draw() {
background(0,0,0,20);
x += 1;
y += 1;

fill(255);
circle (x, y, 10);
}

Thanks in advance.
Cheers,
Adrian.

Maybe use fill() + rect()? :man_shrugging: