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