update method
Implementation
void update(
Random random,
double speed,
double width,
double height,
double rotationSpeed,
) {
z -= speed;
rotation += rotationSpeed;
if (z < 1) {
z = width;
x = random.nextDouble() * width * 2 - width;
y = random.nextDouble() * height * 2 - height;
pz = z;
}
}