Skip to content

Instantly share code, notes, and snippets.

@marimeireles
Created March 16, 2019 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marimeireles/37b104e1fcf6b0ad9c65a08087fdf182 to your computer and use it in GitHub Desktop.
Save marimeireles/37b104e1fcf6b0ad9c65a08087fdf182 to your computer and use it in GitHub Desktop.
p5js girl with planets in her head
i = 0;
j= 0;
k=0;
l=0;
hair = [262, 117,248, 115,234, 118,222, 121,206, 132,195, 143,189, 156,186, 170,184, 183,181, 199,171, 216,160, 233,152, 249,149, 261,152, 271,164, 281,176, 292,185, 306,192, 319,193, 325,207, 314,211, 310,218, 306,222, 306,226, 312,232, 322,243, 330,245, 330,242, 318,247, 312,253, 306,262, 300,275, 292,277, 289,272, 305,268, 312,265, 318,266, 320,276, 317,283, 315,289, 317,294, 315,301, 315,309, 312,319, 310,324, 305,330, 299,333, 292,335, 285,335, 277,333, 273,333, 272,339, 279,340, 289,341, 294,348, 292,352, 285,356, 280,353, 269,344, 255,337, 248,327, 241,323, 233,314, 223,309, 215,299, 195,301, 190,304, 180,306, 175,310, 179,311, 183,313, 182,316, 184,319, 182,321, 183,323, 177,325, 166,326, 155,323, 148,318, 138,312, 131,304, 127,291, 121,285, 119,274, 116,264, 117,261, 117]
face = [321, 183,324, 190,324, 195,326, 201,327, 210,325, 215,324, 222,323, 224,321, 229,321, 232]
rightSide = [193,324,190,334,182,336,173,345,165,352,158,361,150,376,148,388,149,400,152,418,152,427,157,440,161,450,166,462,173,475,179,485,185,490]
leftSide = [292, 317,291, 330,294, 338,301, 347,317, 357,330, 367,344, 375,352, 380,357, 388,360, 402,361, 412,363, 426,363, 436,362, 443,360, 450,359, 456,360, 459]
m=0;
n=0;
planet1 = [353, 110,347, 107,343, 108,337, 110,333, 117,334, 122,335, 125,340, 128,349, 128,355, 123,357, 116,355, 111,358, 115,362, 115,363, 119,360, 121,353, 122,343, 123,334, 124,328, 122,324, 120,324, 117,330, 116,334, 116]
// planet2 = [49, 107 ,38, 106 ,36, 107 ,32, 110 ,29, 117 ,34, 125 ,39, 126 ,47, 126 ,51, 123 ,54, 117 ,53, 112 ,51, 108 ,48, 108 ]
planet3 = [345, 174, 342, 174, 340, 178, 340, 183, 343, 185, 346, 185, 351, 185, 352, 181, 352, 176, 349, 174]
planet4 = [269, 55 ,267, 54 ,260, 52 ,255, 50 ,248, 51 ,244, 56 ,242, 64 ,244, 70 ,248, 75 ,256, 77 ,263, 75 ,267, 70 ,269, 65 ,270, 53 ,269, 66 ,273, 68 ,277, 71 ,277, 75 ,275, 77]
planet5 = [266, 78 ,262, 75 ,254, 71 ,248, 67 ,242, 63 ,233, 58 ,229, 50 ,229, 51 ,233, 49 ,236, 49 ,241, 52 ,244, 55 ,246, 55]
planet6 =[153, 173,147, 173,143, 173,139, 174,137, 178,137, 183,139, 187,145, 191,151, 192,155, 189,157, 186,159, 179,156, 175,151, 173,149, 172,143, 172,150, 172,155, 174,158, 171,161, 169,163, 171,164, 174,164, 176,159, 179,152, 182,150, 184,145, 186,140, 188,136, 189,134, 189,133, 188,133, 186,133, 185,135, 184,137, 184,139, 182]
function setup() {
createCanvas(500, 500);
background(255);
stroke(0);
frameRate(10);
}
function draw() {
line(hair[i], hair[i+1], hair[i+2], hair[i+3]);
i+=2;
line(face[j], face[j+1], face[j+2], face[j+3]);
j+=2;
line(rightSide[k], rightSide[k+1], rightSide[k+2], rightSide[k+3]);
k+=2;
line(leftSide[l], leftSide[l+1], leftSide[l+2], leftSide[l+3]);
l+=2;
line(297,439,300,451)
line(300,451,303,463)
line(303,463,312,478)
line(307,472,312,478)
line(planet1[m], planet1[m+1], planet1[m+2], planet1[m+3]);
// line(planet2[m], planet2[m+1], planet2[m+2], planet2[m+3]);
line(planet3[m], planet3[m+1], planet3[m+2], planet3[m+3]);
line(planet4[m], planet4[m+1], planet4[m+2], planet4[m+3]);
line(planet5[m], planet5[m+1], planet5[m+2], planet5[m+3]);
m+=2
line(planet6[n], planet6[n+1], planet6[n+2], planet6[n+3]);
n+=2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment