Created
January 1, 2021 12:42
-
-
Save hyuki/7eeddfb7b6fdd9f6fe76e640a79d3c83 to your computer and use it in GitHub Desktop.
dots.java - Create simple background images. (Processing)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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++; | |
} | |
} |
Author
hyuki
commented
Jan 1, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment