/** * Created with Curve Draw, * a program by Raphael Rouvinov-Kats * */ var speed = 30; fill(0, 0, 0, 0); var sw = 0.3; var se = 4; var se1 = 2; var nse1 = -1; var drawCurvePart = function(pt, pts, color) { stroke(color); var c = pt; if(c < pts.length - se) { bezier(pts[c][0], pts[c][1], pts[c][0]*nse1+ pts[c+1][0]*se1, pts[c][1]*nse1+ pts[c+1][1]*se1, pts[c+se][0]*nse1+ pts[c+se-1][0]*se1, pts[c+se][1]*nse1+ pts[c+se-1][1]*se1, pts[c+se][0], pts[c+se][1]); } }; var curves = [[[19,86],[21,86],[22,86],[23,86],[24,86],[25,85],[27,80],[28,74],[30,68],[30,62],[31,56],[31,52],[32,49],[33,47],[33,46],[33,48],[32,54],[31,62],[31,73],[31,81],[31,88],[31,94],[31,100],[31,108],[33,114],[35,118],[38,121],[41,123],[46,124],[51,124],[56,124],[61,124],[65,121],[67,117],[69,111],[71,105],[71,100],[71,95],[70,91],[68,90],[67,89],[66,89],[65,89],[62,89],[62,91],[61,95],[61,101],[61,105],[65,111],[69,115],[75,119],[83,121],[92,122],[98,122],[102,121],[107,114],[108,110],[110,102],[110,93],[110,88],[110,83],[108,80],[107,78],[109,78],[112,80],[122,88],[129,92],[133,97],[136,102],[136,104],[136,106],[136,107],[135,109],[131,109],[123,110],[109,110],[102,110],[98,111],[96,112],[95,113],[95,115],[96,117],[97,118],[99,119],[105,121],[112,122],[120,123],[132,123],[138,122],[143,117],[146,113],[148,106],[150,99],[151,92],[153,85],[153,80],[154,72],[154,69],[154,64],[150,56],[149,53],[149,52],[149,51],[149,54],[149,57],[149,61],[149,71],[149,84],[149,94],[151,105],[154,114],[159,126],[163,131],[165,134],[171,136],[176,137],[181,137],[184,137],[187,134],[189,129],[189,125],[190,122],[191,115],[191,112],[191,110],[191,108],[192,106],[192,105],[192,104],[192,105],[192,110],[195,117],[198,121],[202,125],[205,128],[209,130],[212,131],[215,131],[218,131],[222,129],[226,123],[228,117],[231,111],[232,106],[232,101],[233,99],[234,96],[235,96],[236,96],[237,96],[240,99],[243,103],[244,109],[246,115],[246,121],[246,125],[246,126],[246,124],[246,122],[246,120],[249,110],[251,103],[253,99],[255,97],[257,95],[258,95],[260,95],[261,95],[263,96],[265,98],[268,103],[269,107],[269,113],[269,115],[270,117],[270,119],[271,120],[272,121],[273,121],[275,122],[280,122],[289,123],[301,121],[305,119],[313,114],[317,111],[320,107],[321,105],[321,104],[321,103],[320,103],[319,103],[318,103],[317,103],[314,103],[310,104],[308,108],[306,113],[306,116],[306,118],[307,119],[309,119],[310,119],[311,120],[313,120],[314,120],[315,120],[319,119],[320,116],[323,112],[323,109],[324,107],[325,106],[325,105],[326,109],[329,115],[331,124],[331,134],[331,143],[331,151],[328,157],[326,160],[321,164],[315,167],[309,169],[308,169],[306,169],[304,169],[302,169],[301,169],[301,166],[301,163],[301,160],[305,156],[314,149],[322,143],[330,137],[337,132],[342,129],[344,124],[346,120],[348,116],[348,111],[348,109],[348,107]],[[45,75],[44,74],[43,74],[41,74],[40,74],[38,73],[35,73],[33,72],[30,72],[25,72],[23,72],[21,71],[20,71]],[[167,82],[165,82],[162,81],[156,80],[151,80],[146,80],[145,80],[142,80],[141,80]],[[196,90],[195,90],[194,90],[193,90],[192,90],[191,89],[193,89],[195,89],[197,89]],[[26,263],[27,263],[32,264],[41,265],[53,265],[64,265],[70,265],[75,265],[78,265],[79,265]],[[50,265],[50,261],[51,253],[52,241],[53,227],[55,215],[55,205],[55,195],[55,189],[55,185],[55,183],[55,182],[55,184],[52,189],[46,195],[43,199],[39,200],[37,200],[36,200]],[[106,263],[106,268],[105,273],[102,280],[102,284],[99,288],[98,291],[97,292],[96,293],[95,293],[94,293]],[[135,207],[137,206],[140,205],[144,204],[148,204],[152,204],[156,204],[159,204],[162,204],[163,204],[165,205],[166,210],[167,217],[168,226],[168,234],[167,243],[164,251],[161,258],[157,263],[153,267],[147,271],[142,272],[140,273],[137,273],[134,273],[133,273],[132,273],[132,272],[133,272],[135,272],[138,272],[143,272],[149,272],[162,272],[167,272],[179,272],[184,272],[188,272],[191,271],[193,269],[196,265],[198,263]],[[213,262],[213,263],[213,268],[213,269],[213,277],[213,285],[212,292],[210,298],[209,301],[208,303],[207,303],[206,303]],[[242,215],[244,214],[246,212],[251,209],[259,206],[264,203],[268,203],[271,202],[272,202],[272,204],[272,209],[270,215],[266,222],[260,228],[257,231],[253,234],[251,234],[250,234],[249,234],[249,235],[250,235],[252,235],[256,235],[259,236],[262,236],[263,236],[267,240],[269,242],[272,247],[275,258],[275,266],[275,272],[275,275],[273,279],[270,281],[267,282],[263,282],[257,282],[255,282],[250,282],[243,278],[240,276],[240,275]],[[298,276],[297,276],[296,276],[297,276],[298,276],[299,276],[302,276],[303,276]],[[328,278],[326,278],[325,278],[323,278],[321,278],[320,277],[321,277],[322,277],[324,277],[326,277]],[[357,278],[355,278],[353,278],[352,278],[351,278]],[[284,329],[284,330],[284,334],[284,335],[283,337],[283,338],[282,339],[281,340],[280,340],[279,340],[278,340],[278,339],[278,338],[278,337],[278,336],[278,334],[278,333],[278,332],[278,331],[278,330],[279,330],[280,330],[281,330],[282,330],[283,330],[284,330],[284,331],[284,332],[284,333],[284,334],[284,335]],[[316,336],[316,337],[316,338],[316,339],[315,339],[315,338],[315,337],[315,336],[315,335],[315,334],[315,333],[315,332],[316,332],[317,332],[318,332],[319,332],[320,332],[321,333],[321,334],[321,336],[321,337],[321,338],[321,339],[321,340],[321,341],[321,342],[320,342],[319,342],[318,342],[317,342],[316,342],[315,341]],[[246,364],[248,365],[250,367],[251,368],[257,372],[263,376],[270,379],[280,382],[288,385],[295,386],[301,386],[305,386],[310,386],[315,383],[318,381],[320,379],[322,376],[324,372],[326,368],[329,363],[330,359],[332,356],[332,355],[332,353],[332,352],[332,350]]]; frameRate(speed); var c = 0; // current curve var p = 0; // current point background(247, 252, 247); var draw = function() { if(c < curves.length) { strokeWeight(sw); drawCurvePart(p, curves[c], color(0, 0, 0)); p++; if(p === curves[c].length) { c++; p = 0; } } };