Created
January 11, 2018 20:18
-
-
Save TeddyDD/d1573753ed93e207b46fd00ccc91737a to your computer and use it in GitHub Desktop.
processing sketch with japaneese-like charachters
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 grid = 24; | |
void setup() { | |
size(1600, 900); | |
frameRate(0.3); | |
//noLoop(); | |
} | |
void draw_letter(int strokes, float size, float x, float y) { | |
for (int p = 0; p < strokes; p++) { | |
float[] xps = new float[4]; | |
float[] yps = new float[4]; | |
for (int i = 0; i < 4; i++) { | |
xps[i] = random(0, size) + x; | |
yps[i] = random(0, size) + y; | |
} | |
stroke(random(0,30)); | |
strokeWeight(random(1, 3)); | |
noFill(); | |
bezier(xps[0], yps[0], | |
xps[1], yps[1], | |
xps[2], yps[2], | |
xps[3], yps[3]); | |
} | |
} | |
void draw() { | |
background(255); | |
for (int y = 0; y < height; y += height/grid) { | |
for (int x = 0; x < width; x += width/grid) { | |
draw_letter((int)random(1, 4), grid-3, x, y); | |
} | |
} | |
saveFrame("znaczki####.png"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment