|
int MAX = 100; |
|
int COUNT = 3; |
|
int SIZE = 400; |
|
int HUES = 100; |
|
int FONTBASESIZE = 200; |
|
int FONTRANGESIZE = 800; |
|
|
|
size(1280, 670); |
|
noStroke(); |
|
|
|
String[] fontlist = PFont.list(); |
|
for (int i = 0; i < 300 /* fontlist.length */; i++){ |
|
println(i + ":" + fontlist[i]); |
|
} |
|
|
|
int id = 100; |
|
for (int hue = 0; hue < HUES; hue += 2) { |
|
for (int count = 0; count < 2; count++) { |
|
colorMode(RGB, 255); |
|
background(255); |
|
colorMode(HSB, MAX, MAX, MAX); |
|
float bgsaturation = 5 + random(30); |
|
float bgbrightness = 90 + random(10); |
|
background(hue, bgsaturation, bgbrightness); |
|
|
|
for(int i = 0; i < COUNT; i++) { |
|
float fontsize = FONTBASESIZE + random(FONTRANGESIZE); |
|
PFont f = createFont("Zapfino", fontsize); |
|
// PFont f = createFont("HiraginoSans-W3", fontsize); |
|
// PFont f = createFont("Wingdings2", fontsize); |
|
// PFont f = createFont("BodoniOrnamentsITCTT", fontsize); // kararimoji |
|
|
|
textFont(f); |
|
textAlign(CENTER); |
|
|
|
// 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); |
|
|
|
String[] list = { |
|
"Lorem","ipsum","dolor","sit","amet","consectetur","adipiscing","elit","sed","do","eiusmod","tempor","incididunt","ut","labore","et","dolore","magna","aliqua","Ut","enim","ad","minim","veniam","quis","nostrud","exercitation","ullamco","laboris","nisi","ut","aliquip","ex","ea","commodo","consequat","Duis","aute","irure","dolor","in","reprehenderit","in","voluptate","velit","esse","cillum","dolore","eu","fugiat","nulla","pariatur","Excepteur","sint","occaecat","cupidatat","non","proident","sunt","in","culpa","qui","officia","deserunt","mollit","anim","id","est","laborum", |
|
}; |
|
String s = ""; |
|
for (int c = 0; c < 10; c++) { |
|
s += list[int(random(list.length))] + " "; |
|
} |
|
text(s, mx, my); |
|
} |
|
save("/Users/user/sand/newsletter-" + id + ".png"); |
|
id++; |
|
} |
|
} |
|
|