Last active
January 17, 2019 08:22
-
-
Save gabrielflorit/db3b268a4aa293d716d2421c1fc0d4da to your computer and use it in GitHub Desktop.
SCRIPT-8
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
{} |
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
// title: poly mess | |
const shape = ({ x, y, h, w1, w2, c }) => { | |
polyStroke( | |
[ | |
[x, y], | |
[x + w1, y], | |
[x + w1 - (w1 - w2)/2, y + h], | |
[x + w1 - (w1 - w2)/2 - w2, y + h] | |
], 512, c) | |
} | |
draw = () => { | |
clear() | |
const ps = {x: 7, y: 20, h: 66, w1: 164, w2: 80, c: 0} | |
range(ps.h / 2 + 1).forEach(i => { | |
shape({ | |
...ps, | |
x: ps.x + 2 * i, | |
y: ps.y + i, | |
h: ps.h - 2 * i, | |
w1: ps.w1 - 4 * i, | |
w2: ps.w2, | |
c: i/2 % 7 | |
}) | |
}) | |
} |
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
[] |
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
{} |
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
{} |
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
{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment