Skip to content

Instantly share code, notes, and snippets.

@hyuki
Created January 1, 2021 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyuki/7eeddfb7b6fdd9f6fe76e640a79d3c83 to your computer and use it in GitHub Desktop.
Save hyuki/7eeddfb7b6fdd9f6fe76e640a79d3c83 to your computer and use it in GitHub Desktop.
dots.java - Create simple background images. (Processing)
int MAX = 100;
int COUNT = 10;
int SIZE = 400;
size(1280, 670);
noStroke();
int id = 100;
for (int hue = 0; hue < 100; hue += 5) {
for (int count = 0; count < 2; count++) {
colorMode(RGB, 255);
background(255);
colorMode(HSB, MAX, MAX, MAX);
background(hue, 20, 90);
for(int i = 0; i < COUNT; i++) {
// float hue = random(MAX);
float saturation = random(MAX);
float brightness = random(MAX);
fill(hue, saturation, brightness, 50);
float mx = random(width);
float my = random(height);
float size = random(SIZE);
ellipse(mx, my, size, size);
}
save("/tmp/dots-" + id + ".png");
id++;
}
}
@hyuki
Copy link
Author

hyuki commented Jan 1, 2021

image

@hyuki
Copy link
Author

hyuki commented Jan 1, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment