Created
August 20, 2021 15:55
-
-
Save runemadsen/c1d979798da6163e07be70f143fc8bcc to your computer and use it in GitHub Desktop.
The new Processing logo program
This file contains hidden or 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 u = 60; | |
boolean showGrid = true; | |
void setup() { | |
size(480, 480); | |
} | |
void draw() { | |
background(255); | |
if(showGrid) drawGrid(); | |
strokeCap(SQUARE); | |
strokeWeight(1.5 * u); | |
stroke(5, 100, 255); | |
bezier(4 * u, 1 * u, 7 * u, 1 * u, 7 * u, 5 * u, 4 * u, 5 * u); | |
stroke(30, 50, 170); | |
line(1 * u, 6 * u, 4 * u, 2 * u); | |
stroke(130, 175, 255); | |
line(1 * u, 3 * u, 2 * u, 5 * u); | |
} | |
void drawGrid() { | |
strokeWeight(1); | |
noFill(); | |
stroke(200); | |
for(int col = 0; col < 9; col++) { | |
line(col * u, 0, col * u, 8 * u); | |
} | |
for(int row = 0; row < 9; row++) { | |
line(0, row * u, 8 * u, row * u); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment