/** * Created with Curve Draw, * a program by Raphael Rouvinov-Kats * */ var speed = 60; fill(200, 0, 0, 40); var sw = 0.1; var se = 4; var se1 = 2; var nse1 = 1 - se1; 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 = [[[177,179],[173,178],[167,178],[160,176],[152,176],[148,176],[143,176],[138,176],[133,177],[127,180],[121,184],[114,188],[108,192],[102,197],[96,204],[89,214],[86,220],[86,222],[84,230],[83,236],[82,242],[82,251],[82,259],[82,266],[82,274],[82,281],[84,291],[86,295],[89,304],[100,318],[107,325],[114,333],[121,338],[132,345],[135,346],[144,349],[154,353],[163,355],[172,355],[183,355],[194,355],[212,353],[223,348],[234,342],[243,337],[252,329],[262,319],[266,315],[273,303],[275,300],[279,290],[281,283],[283,277],[284,270],[285,263],[285,257],[285,251],[285,244],[285,238],[283,232],[280,225],[276,217],[273,212],[271,209],[267,205],[264,203],[262,201],[255,197],[252,194],[245,191],[239,188],[231,184],[229,183],[222,181],[219,179],[213,177],[211,176],[205,175],[201,173],[198,173],[194,172],[190,171],[186,171],[179,170],[171,168],[164,167],[162,167],[159,167],[154,167],[150,167]],[[89,210],[88,210],[81,202],[78,198],[73,187],[67,165],[63,153],[61,140],[61,131],[61,124],[61,121],[61,118],[65,116],[68,116],[83,115],[97,115],[117,115],[123,118],[139,126],[148,135],[152,141],[155,149],[157,153],[158,158],[158,161],[158,171],[158,175],[158,177],[158,179],[158,180]],[[225,177],[229,173],[251,151],[260,143],[269,138],[276,136],[282,136],[287,134],[292,134],[300,137],[303,140],[304,142],[305,145],[306,149],[306,159],[305,168],[301,178],[295,189],[293,195],[290,202],[287,207],[283,210],[282,211],[274,215],[269,218],[266,219],[265,220]],[[163,260],[172,262],[177,263],[182,263],[186,263],[187,263],[188,263],[188,267],[188,269],[187,272],[186,275],[184,278],[182,281],[181,282],[180,282],[179,282],[178,282],[175,282],[170,279],[165,275],[163,273],[162,269],[162,267],[162,266],[163,261],[164,260]],[[131,291],[130,294],[130,300],[130,306],[145,307],[159,304],[167,300],[171,297],[175,294],[177,291],[177,287],[178,277],[178,275]],[[179,284],[179,286],[179,293],[181,303],[185,307],[191,313],[199,316],[218,316],[225,313],[228,306]],[[208,280],[238,280],[272,280],[297,286]],[[213,283],[212,281],[212,278],[219,276],[250,275],[266,275],[284,281],[299,285],[319,290],[324,291]],[[224,299],[235,299],[275,299],[302,305],[316,313],[323,318]],[[237,320],[265,335],[302,349],[318,352],[320,353]],[[122,259],[116,256],[109,253],[101,250],[85,246],[55,243],[40,243]],[[108,273],[107,273],[103,273],[86,273],[69,271],[56,269],[46,268],[39,267]],[[103,296],[86,300],[53,301],[48,301],[45,301],[44,299]],[[124,224],[128,222],[130,221],[136,219],[137,219],[141,219],[142,219],[143,219],[144,219],[146,220],[149,222],[154,226],[158,228],[159,229],[160,231],[161,232],[163,233],[165,235],[165,236],[166,236],[168,238],[170,240],[173,242],[178,244],[179,244]],[[122,225],[122,226],[122,227],[124,232],[126,234],[127,236],[131,239],[135,242],[138,244],[142,245],[146,246],[150,246],[152,247],[158,248],[162,248],[165,249],[167,249],[170,249],[171,248],[172,247]],[[190,244],[193,244],[196,244],[199,244],[200,244],[202,243],[203,242],[205,242],[208,240],[210,239],[211,238],[214,236],[217,235],[219,234],[223,233],[225,232],[229,232],[230,232],[233,232],[235,232],[237,233],[239,234],[240,235],[241,235],[242,237],[244,240],[245,242],[246,244],[248,246],[248,247],[249,247],[249,249],[250,249]],[[196,246],[198,247],[202,249],[203,249],[209,251],[215,252],[216,253],[218,254],[223,254],[225,254],[228,254],[233,254],[235,254],[238,254],[241,254],[242,254],[244,254],[247,253],[248,252],[248,251],[249,251]],[[140,220],[138,220],[137,220],[136,222],[136,224],[135,225],[135,227],[134,229],[134,231],[134,232],[133,234],[133,237],[133,238],[133,240],[134,241],[135,241],[135,243],[137,244],[138,244]],[[156,227],[157,229],[157,231],[158,233],[158,235],[159,237],[159,239],[159,240],[159,241],[159,243],[157,245],[156,246],[155,247],[155,248],[153,249],[152,250],[151,250]],[[218,234],[218,235],[218,237],[218,239],[218,242],[218,244],[218,246],[218,247],[218,249],[218,250],[219,251],[220,253],[222,254],[223,255],[224,256],[225,256]],[[237,233],[238,234],[239,235],[240,237],[240,238],[241,240],[241,241],[241,243],[241,244],[241,245],[240,246],[240,247],[239,249],[238,251],[238,252],[237,253],[237,255],[236,255],[235,255]],[[145,221],[144,221],[143,221],[143,223],[143,226],[142,227],[142,228],[142,230],[142,232],[142,233],[142,234],[142,235],[143,237],[143,238],[143,239],[143,241],[143,242],[143,243],[143,244],[144,245],[144,246],[145,247]],[[151,224],[151,228],[151,229],[151,230],[151,231],[151,232],[151,233],[151,234],[151,236],[151,237],[150,239],[150,240],[150,242],[150,244],[149,245],[149,247],[149,248],[148,249],[148,250]],[[228,232],[228,233],[228,234],[227,235],[227,237],[227,238],[227,240],[227,241],[227,242],[227,243],[227,245],[227,246],[227,247],[227,248],[227,249],[227,250],[228,252],[228,253],[229,255],[230,255]],[[233,235],[233,237],[233,239],[233,240],[233,242],[233,243],[233,244],[233,246],[233,247],[233,248],[233,249],[233,250],[233,251],[233,252],[232,252],[232,253],[232,254]],[[233,233],[233,234],[233,235],[233,236],[233,237],[233,238],[233,239]],[[151,224],[152,227],[152,228],[152,229],[152,230]],[[153,196],[189,191],[205,191],[231,193]],[[111,337],[102,342],[96,346],[93,349],[86,356],[82,361],[80,364],[76,371],[74,375],[73,380],[70,388],[69,390],[68,393],[67,396],[66,398],[66,399]],[[235,343],[236,344],[239,348],[241,352],[241,355],[242,359],[243,361],[243,365],[244,368],[244,370],[244,375],[245,378],[245,380],[245,382],[245,385],[245,389],[245,395],[245,398]],[[131,394],[131,392],[131,390],[131,388],[131,385],[131,383],[131,381],[131,380],[131,379],[132,379],[134,379],[135,381],[136,382],[137,383],[137,385],[138,386],[139,387],[140,384],[141,381],[143,376],[144,372],[145,371],[147,369],[148,367],[149,365],[150,365],[150,367],[150,370],[150,373],[150,374],[150,375],[150,378],[150,379],[150,380],[151,380],[152,378],[154,375],[155,374],[156,373],[157,373],[158,373],[159,373],[159,376],[159,380],[159,381],[159,382],[163,381],[165,380],[167,379],[168,379],[169,379],[170,379],[171,380],[171,381],[171,383],[171,385],[171,386],[171,387],[168,388],[166,389],[165,390],[163,391],[163,392],[163,393],[163,394],[163,395],[163,396],[163,397],[163,398]],[[174,395],[174,392],[174,390],[174,389],[174,388],[174,387],[174,385],[174,384],[174,382],[174,381],[174,380],[174,379],[174,378],[174,377],[174,375],[174,374],[173,373],[172,373],[170,374],[169,375],[169,374],[168,373],[167,372],[167,371],[165,371],[164,371],[162,372],[161,372],[160,373],[160,374],[159,374],[159,373],[158,371],[157,369],[157,368],[156,368],[156,367],[155,365],[154,365],[154,366],[154,367],[152,368]],[[144,369],[144,370],[142,371],[142,372],[141,374],[140,375],[140,376],[139,376],[138,377],[138,378],[137,378],[135,379],[134,379],[134,380],[133,380]],[[173,390],[173,391],[173,392],[173,395],[173,396],[174,397],[174,398],[174,399]],[[131,392],[130,393],[129,394],[127,395],[126,396],[125,397],[124,397],[121,397],[120,398],[118,398],[118,399]],[[98,375],[96,380],[96,382],[95,387],[93,391],[93,393],[93,395],[93,399]],[[222,375],[222,380],[222,382],[222,384],[222,386],[222,390],[222,391],[221,394],[220,398]],[[173,271],[172,272],[171,272],[170,272]],[[172,271],[172,272],[172,274],[171,274],[171,273],[171,272],[172,272],[172,273],[172,274]],[[183,273],[182,273],[182,272],[182,271],[182,270],[183,270],[183,271],[183,272],[183,273],[183,274]],[[104,193],[100,187],[98,182],[97,178],[96,171],[95,168],[95,165],[94,161],[94,157],[94,155],[95,155],[103,155],[106,155],[110,157],[118,166],[121,170],[125,175],[126,177],[127,177],[127,178],[127,179]],[[243,188],[248,185],[250,185],[253,183],[256,180],[259,179],[264,178],[268,178],[271,178],[276,178],[277,178],[278,179],[278,184],[278,187],[277,190],[275,191],[272,194],[270,196],[268,198],[267,199],[266,200],[265,200],[264,201],[264,202],[263,202]],[],[[169,194],[187,194],[204,196],[212,199]],[[195,137],[192,137],[191,140],[191,146],[196,149],[208,150],[211,148],[211,142],[211,136],[204,133],[203,133],[202,133],[199,133],[198,133]],[[203,103],[209,103],[213,103],[214,104],[214,110],[213,114],[210,115],[204,115],[198,114],[195,112],[194,110],[194,106],[195,104],[198,101],[201,101]],[[210,43],[205,46],[205,51],[208,62],[216,70],[218,70],[222,70],[223,70],[223,80],[229,91],[235,97],[240,101],[251,106],[259,107],[266,107],[279,103],[281,100],[282,100],[300,112],[311,118],[324,122],[337,122],[360,122],[368,115],[372,109],[372,102],[367,90],[366,88],[367,88],[371,86],[375,83],[379,79],[380,71],[380,67],[379,62],[373,52],[372,51],[371,50],[370,50],[366,57],[365,58],[360,48],[357,42],[352,36],[344,28],[339,25],[336,24],[330,24],[325,27],[322,29],[320,31],[319,34],[316,35],[311,30],[306,26],[297,21],[291,18],[282,14],[277,13],[274,13],[267,13],[266,19],[266,21],[266,22],[265,23],[251,18],[243,16],[236,15],[225,14],[218,14],[215,14],[210,16],[206,19],[203,21],[203,23],[201,27],[201,30],[201,35],[201,38],[202,40],[204,43],[205,44],[206,44],[206,45],[207,46],[208,46],[209,46]],[[318,62],[319,63],[320,66],[320,67],[321,67],[321,68],[321,69],[321,70],[322,70],[322,71]],[[324,63],[323,63],[322,64],[321,64],[320,65],[320,66],[319,66],[318,67],[317,68]],[[318,76],[320,79],[320,80],[321,81],[321,82],[322,82],[322,83]],[[324,76],[322,76],[320,79],[319,80],[318,80],[318,82],[317,82],[316,83],[315,83],[314,83]],[[312,57],[315,57],[318,57],[321,58],[322,59],[324,59],[326,62],[328,65],[328,66],[328,68],[329,72],[329,73],[329,79],[329,81],[329,86],[329,89],[329,92],[327,93],[324,94],[321,95],[319,95],[317,95],[313,95],[310,94],[306,92],[304,91],[301,88],[300,87],[300,84],[299,82],[299,79],[299,76],[299,74],[299,72],[301,68],[302,65],[303,62],[305,60],[306,59],[308,58],[312,58],[313,57],[315,56],[317,54]],[[328,68],[329,68],[330,69],[333,69],[336,69],[338,68],[337,68],[335,70],[334,72],[333,74],[331,75],[330,76],[329,76]],[[329,82],[331,83],[333,84],[335,86],[341,91],[340,91],[336,92],[334,92],[333,93],[332,93],[330,93],[329,93]],[[303,60],[298,55],[294,52],[291,50],[286,47],[283,46],[279,46],[276,46],[273,46],[270,48],[267,50],[265,52],[264,52],[261,55],[260,56],[259,57],[259,58],[259,59],[259,62],[262,68],[268,73],[270,75],[273,76],[275,78],[279,80],[283,82],[286,83],[291,84],[295,85],[296,85],[297,85],[301,85],[303,85]],[[263,69],[263,71],[263,75],[263,77],[263,80],[263,82],[264,86],[264,88],[265,91],[267,94],[267,95],[271,100],[271,101],[273,101],[273,99],[273,96],[272,93],[270,89],[269,86],[268,83],[267,80],[266,76],[265,74],[265,73],[265,71],[265,70],[265,68],[265,67]],[[271,91],[269,91],[268,91],[267,91],[266,92]],[[266,80],[265,80],[264,80],[263,80]],[[263,59],[259,57],[257,57],[255,56],[253,56],[250,56],[249,55]],[[280,53],[278,53],[277,50],[275,48],[274,47],[274,46],[272,42],[272,41],[271,40]],[[288,54],[291,51],[294,47],[295,47],[296,47],[297,47],[299,47],[300,47]],[[286,74],[284,78],[284,80],[283,82],[283,83],[283,84],[283,85],[283,86],[283,87],[283,88],[283,89],[284,90],[284,91],[284,91],[285,92]],[],[[332,81],[336,81],[337,81],[339,81],[340,82],[341,83],[342,83],[342,84],[342,87],[342,88],[344,90],[344,93],[344,94],[344,99],[343,99],[341,101],[340,102],[338,102],[333,102],[331,102],[329,102],[328,102],[326,101],[325,99],[324,98],[324,97],[324,95],[324,94]],[[332,78],[334,78],[337,77],[338,77],[340,72],[340,70],[341,67],[341,64],[341,60],[341,59],[340,58],[339,58],[336,58],[334,58],[332,60],[331,61],[330,62],[330,63],[329,65],[329,66],[328,67],[327,68]],[[310,72],[312,71],[313,71],[314,71],[314,73],[314,74],[312,75],[309,74],[308,73],[307,72],[307,71],[307,70],[309,70],[311,74],[312,76],[311,76],[310,76],[309,76],[308,74],[308,73],[308,72],[310,72],[311,72],[312,72],[312,73],[312,74],[311,74],[312,73],[312,70],[312,69],[311,69],[310,69],[309,69],[309,70],[309,72]],[[310,64],[309,60],[309,56],[308,50],[308,49]],[[310,63],[313,56],[314,52],[315,48]],[[312,63],[315,60],[317,57],[318,55],[319,55],[319,54]],[[307,80],[305,86],[305,89],[303,91],[301,93],[300,94],[298,97],[298,98],[297,99]],[[308,85],[308,90],[307,93],[307,94],[307,96],[307,97],[306,98],[306,99],[306,100]],[[311,86],[311,91],[311,94],[312,97],[313,101],[313,102],[313,103],[313,106]],[[228,55],[233,54],[235,53],[239,52],[241,51],[243,51],[244,51],[245,51],[246,51],[248,50],[249,50],[252,49],[252,48],[252,45],[252,43],[252,40],[252,38],[252,36],[252,34],[252,33],[252,32],[251,32],[247,31],[245,31],[244,31],[240,30],[237,30],[233,30],[230,30],[227,30],[226,30],[224,30],[224,31],[224,35],[224,36],[228,37],[229,37],[230,37],[231,37],[233,37],[237,37],[239,37],[242,37],[243,37],[244,36],[246,36],[247,35],[248,33],[249,33],[250,32]],[[228,38],[230,45],[230,47],[231,48],[231,49],[231,50],[231,51],[231,52],[231,53],[232,54],[231,54],[230,54],[229,54],[228,53],[226,51],[226,50],[226,47],[226,44],[226,43],[225,41],[225,39],[224,37],[224,35],[223,34],[223,32],[223,31]],[[234,40],[233,40],[232,41],[231,43],[233,44],[234,44],[235,44],[236,44],[238,44],[239,44],[239,43],[239,42],[238,41],[237,40],[236,40],[235,40],[234,39],[233,39],[232,39]],[[245,44],[245,46],[246,47],[247,48],[248,48],[249,47],[249,46],[249,43],[249,42],[248,41],[247,41],[245,41],[244,42],[244,43],[244,44],[244,46],[244,47],[244,48]]]; frameRate(speed); var c = 0; // current curve var p = 0; // current point background(255, 246, 212); var draw = function() { if(c < curves.length) { strokeWeight(sw); drawCurvePart(p, curves[c], color(200, 0, 0)); p++; if(p === curves[c].length) { c++; p = 0; } } };