ЯтомизоnoR

R, Statistics

Graph Hatsune Miku Curve

Mathholic enthusiasts found a Hatsune Miku Equation to draw Hatsune Miku curve. They shared the equation and the result with Mathematica.

I love this. Why don’t you port the Hatsune Miku equation into the R?

miku.x.R – Hatsune Miku equation x(t)
x <- function(t) ((-7/2*sin(11/7-9*t)-7/8*sin(11/7-3*t)-241/24*sin(11/7-t)+10/3*sin(2*t+11/7)+11/3*sin(4*t+33/7)+61/5*sin(5*t+8/5)+69/5*sin(6*t+8/5)+85/28*sin(7*t+33/7)+19/5*sin(8*t+11/7)+2*sin(10*t+11/7)+1/16*sin(11*t+11/6)+3/7*sin(12*t+33/7)-617/3)*theta(131*pi-t)*theta(t-127*pi)+(-2/5*sin(11/7-5*t)+27/2*sin(t+11/7)+61/6*sin(2*t+11/7)+1/9*sin(3*t+14/3)+4/3*sin(4*t+11/7)+16/17*sin(6*t+11/7)+1/10*sin(7*t+33/7)+1/5*sin(8*t+8/5)+1/5*sin(9*t+8/5)+2/7*sin(10*t+8/5)+1/27*sin(11*t+14/3)+1/4*sin(12*t+8/5)-572/5)*theta(127*pi-t)*theta(t-123*pi)+(-1/12*sin(11/7-5*t)-7/5*sin(11/7-3*t)-443/8*sin(11/7-t)+1/3*sin(2*t+11/7)+5/2*sin(4*t+8/5)+4/3*sin(6*t+8/5)+1/13*sin(7*t+32/7)+1/4*sin(8*t+11/7)+1/19*sin(10*t+10/7)+1/9*sin(11*t+14/3)+586/15)*theta(123*pi-t)*theta(t-119*pi)+(-13/14*sin(3/2-40*t)-4/3*sin(3/2-30*t)-16/11*sin(3/2-29*t)-13/2*sin(11/7-26*t)-25/4*sin(11/7-24*t)-11/3*sin(3/2-17*t)-71/11*sin(11/7-14*t)-275/8*sin(11/7-4*t)-30/7*sin(10/7-2*t)+229/7*sin(t+8/5)+239/34*sin(3*t+32/7)+579/4*sin(5*t+33/7)+128*sin(6*t+11/7)+76/9*sin(7*t+11/7)+175/6*sin(8*t+17/11)+263/8*sin(9*t+11/7)+194/7*sin(10*t+11/7)+149/5*sin(11*t+33/7)+23*sin(12*t+33/7)+5/7*sin(13*t+4)+71/6*sin(15*t+11/7)+69/5*sin(16*t+11/7)+58/5*sin(18*t+11/7)+5/4*sin(19*t+8/5)+16/3*sin(20*t+11/7)+134/15*sin(21*t+33/7)+13/7*sin(22*t+7/5)+8/5*sin(23*t+17/9)+241/30*sin(25*t+14/3)+1/2*sin(27*t+23/11)+29/8*sin(28*t+8/5)+26/7*sin(31*t+17/11)+7*sin(32*t+14/9)+18/5*sin(33*t+3/2)+11/7*sin(34*t+3/2)+6/5*sin(35*t+14/3)+3/2*sin(36*t+33/7)+1/6*sin(37*t+39/11)+18/7*sin(38*t+11/7)+2*sin(39*t+33/7)+1/5*sin(41*t+5/2)+2/7*sin(42*t+11/6)-2277/5)*theta(119*pi-t)*theta(t-115*pi)+(-221/20*sin(11/7-17*t)-33/2*sin(11/7-15*t)-186/11*sin(11/7-12*t)-111/5*sin(11/7-3*t)-85/4*sin(11/7-2*t)+968/9*sin(t+11/7)+26/7*sin(4*t+8/5)+11/5*sin(5*t+8/5)+47/2*sin(6*t+33/7)+11/6*sin(7*t+23/5)+29/5*sin(8*t+14/9)+90/7*sin(9*t+11/7)+13/8*sin(10*t+33/7)+164/7*sin(11*t+33/7)+22/3*sin(13*t+33/7)+13/3*sin(14*t+11/7)+8/9*sin(16*t+17/9)+2*sin(18*t+8/5)+1/7*sin(19*t+8/7)+36/5*sin(20*t+11/7)+27/8*sin(21*t+8/5)+19/9*sin(22*t+33/7)+6/5)*theta(115*pi-t)*theta(t-111*pi)+(-1/4*sin(9/7-39*t)-5/7*sin(7/5-35*t)-16/3*sin(17/11-32*t)-20/7*sin(3/2-30*t)-9/10*sin(7/5-29*t)-13/6*sin(3/2-28*t)-23/3*sin(3/2-27*t)-31/5*sin(14/9-24*t)-37/6*sin(14/9-22*t)-4/5*sin(3/2-20*t)-123/5*sin(14/9-16*t)-5/4*sin(6/5-15*t)-42/5*sin(17/11-14*t)-23*sin(14/9-13*t)-34/7*sin(3/2-12*t)-207/13*sin(11/7-11*t)-230/3*sin(11/7-8*t)-655/6*sin(11/7-4*t)+245/4*sin(t+33/7)+91/3*sin(2*t+11/7)+136/7*sin(3*t+8/5)+1036/17*sin(5*t+8/5)+34/5*sin(6*t+11/7)+311/8*sin(7*t+8/5)+475/14*sin(9*t+8/5)+97/5*sin(10*t+8/5)+7/5*sin(17*t+10/7)+11/7*sin(18*t+8/5)+17/4*sin(19*t+13/8)+97/24*sin(21*t+8/5)+9/4*sin(23*t+3/2)+13/9*sin(25*t+3/2)+10/7*sin(26*t+5/3)+10/7*sin(31*t+14/9)+5/2*sin(33*t+11/7)+5/7*sin(34*t+14/3)+3/2*sin(36*t+7/4)+9/8*sin(37*t+8/5)+4/3*sin(38*t+7/4)+5/8*sin(40*t+14/3)+1/7*sin(41*t+10/11)+5/6*sin(42*t+14/3)+4291/8)*theta(111*pi-t)*theta(t-107*pi)+(-1/3*sin(1/6-59*t)-sin(9/7-36*t)-5/6*sin(6/5-20*t)-25/3*sin(11/7-6*t)-20/3*sin(3/2-2*t)+2/5*sin(t+7/3)+16/5*sin(3*t+9/5)+161/10*sin(4*t+33/7)+93/4*sin(5*t+3/2)+53/4*sin(7*t+13/9)+10/7*sin(8*t+14/3)+51/7*sin(9*t+32/7)+13/7*sin(10*t+15/8)+79/6*sin(11*t+32/7)+27/13*sin(12*t+13/7)+32/7*sin(13*t+23/5)+5/7*sin(14*t+9/4)+6/7*sin(15*t+5/7)+19/5*sin(16*t+4/3)+1/2*sin(17*t+5/3)+35/9*sin(18*t+9/2)+13/12*sin(19*t+8/5)+25/4*sin(21*t+9/7)+20/7*sin(22*t+22/5)+27/4*sin(23*t+17/4)+46/15*sin(24*t+21/5)+33/5*sin(25*t+1)+126/11*sin(26*t+8/7)+56/5*sin(27*t+17/4)+38/5*sin(28*t+45/11)+33/5*sin(29*t+1)+13/8*sin(30*t+6/5)+29/8*sin(31*t+17/4)+18/5*sin(32*t+1)+5/4*sin(33*t+67/17)+19/4*sin(34*t+29/7)+22/5*sin(35*t+13/12)+1/2*sin(37*t+3/2)+10/7*sin(38*t+4/5)+13/5*sin(39*t+4)+1/2*sin(40*t+12/13)+10/7*sin(41*t+5/7)+1/2*sin(42*t+5/6)+sin(43*t+2/7)+3/5*sin(44*t+7/5)+19/9*sin(45*t+4)+2/5*sin(46*t+55/27)+4/5*sin(47*t+2/3)+6/5*sin(48*t+35/9)+1/2*sin(49*t+6/5)+3/5*sin(50*t+37/9)+1/3*sin(51*t+14/5)+1/5*sin(52*t+2/7)+5/8*sin(53*t+18/5)+3/4*sin(54*t+1/3)+1/6*sin(55*t+1/2)+1/3*sin(56*t+11/3)+1/10*sin(57*t+23/5)+1/3*sin(58*t+4/5)+1/7*sin(60*t+3/4)+4/9*sin(61*t+1/7)+4217/19)*theta(107*pi-t)*theta(t-103*pi)+(-1/21*sin(7/5-18*t)-6/13*sin(17/11-15*t)-3/4*sin(14/9-14*t)-4/3*sin(3/2-13*t)-1/4*sin(16/11-12*t)-6/7*sin(14/9-11*t)-14/5*sin(14/9-8*t)-43/6*sin(11/7-7*t)-77/5*sin(11/7-2*t)+422/5*sin(t+11/7)+107/7*sin(3*t+8/5)+4/7*sin(4*t+11/7)+41/5*sin(5*t+8/5)+12/7*sin(6*t+8/5)+11/7*sin(9*t+8/5)+5/8*sin(10*t+13/8)+1/15*sin(16*t+14/3)+4/7*sin(17*t+8/5)+3/8*sin(20*t+8/5)+432/7)*theta(103*pi-t)*theta(t-99*pi)+(-2*sin(11/7-7*t)+26/5*sin(t+11/7)+122/7*sin(2*t+33/7)+91/4*sin(3*t+11/7)+191/12*sin(4*t+11/7)+9/8*sin(5*t+8/5)+19/7*sin(6*t+11/7)+5/6*sin(8*t+8/5)+5/7*sin(9*t+33/7)+4/7*sin(10*t+8/5)+28/27*sin(11*t+11/7)+13/8*sin(12*t+11/7)+645/23)*theta(99*pi-t)*theta(t-95*pi)+(-11/7*sin(14/9-12*t)-23/5*sin(14/9-11*t)-13/3*sin(11/7-8*t)-28/9*sin(11/7-7*t)-77/5*sin(11/7-2*t)+1/2*sin(t+14/3)+5/3*sin(3*t+11/7)+31/4*sin(4*t+8/5)+121/30*sin(5*t+8/5)+sin(6*t+33/7)+27/5*sin(9*t+8/5)+3/2*sin(10*t+8/5)-659/6)*theta(95*pi-t)*theta(t-91*pi)+(-13/5*sin(11/7-10*t)-85/8*sin(14/9-5*t)-343/19*sin(14/9-4*t)-53/4*sin(11/7-3*t)-34/7*sin(11/7-2*t)+45/4*sin(t+11/7)+2/3*sin(6*t+5/3)+44/5*sin(7*t+8/5)+27/4*sin(8*t+13/8)+6/7*sin(9*t+33/7)+49/4*sin(11*t+13/8)+83/8*sin(12*t+8/5)+749/4)*theta(91*pi-t)*theta(t-87*pi)+(62/3*sin(t+11/7)+1/6*sin(2*t+33/7)+19/9*sin(3*t+11/7)+1/3*sin(4*t+33/7)+5/7*sin(5*t+11/7)+176/9)*theta(87*pi-t)*theta(t-83*pi)+(58/5*sin(t+11/7)+19/3*sin(2*t+11/7)+11/5*sin(3*t+11/7)+5/9*sin(4*t+8/5)+1/5*sin(5*t+8/5)+1/5*sin(6*t+8/5)+2/5*sin(7*t+8/5)-7/2)*theta(83*pi-t)*theta(t-79*pi)+(-2/5*sin(3/2-29*t)-4/5*sin(3/2-28*t)-12/13*sin(3/2-27*t)-2/7*sin(17/11-25*t)-19/7*sin(14/9-24*t)-2/7*sin(10/7-22*t)-16/17*sin(11/7-20*t)-23/12*sin(11/7-19*t)-3/7*sin(13/9-17*t)-14/3*sin(11/7-14*t)-4/5*sin(17/11-13*t)-46/5*sin(11/7-11*t)-13/4*sin(14/9-9*t)-75/8*sin(11/7-7*t)-59/7*sin(11/7-6*t)-19/2*sin(14/9-4*t)-130/3*sin(11/7-3*t)-1003/5*sin(11/7-2*t)+625/9*sin(t+11/7)+116/11*sin(5*t+11/7)+11/7*sin(8*t+14/3)+37/12*sin(10*t+11/7)+49/11*sin(12*t+8/5)+9/7*sin(15*t+33/7)+12/5*sin(16*t+11/7)+4/5*sin(18*t+8/5)+2/5*sin(21*t+11/7)+1/4*sin(23*t+32/7)+2/3*sin(26*t+11/7)+1/5*sin(30*t+14/3)-281/2)*theta(79*pi-t)*theta(t-75*pi)+(-2/5*sin(3/2-21*t)-11/4*sin(11/7-16*t)-9/5*sin(11/7-10*t)-131/6*sin(11/7-5*t)+233/6*sin(t+11/7)+83/6*sin(2*t+11/7)+49/4*sin(3*t+33/7)+29/3*sin(4*t+11/7)+9/10*sin(6*t+14/3)+7/3*sin(7*t+33/7)+37/5*sin(8*t+11/7)+55/7*sin(9*t+11/7)+13/3*sin(11*t+33/7)+13/8*sin(12*t+8/5)+24/7*sin(13*t+11/7)+25/4*sin(14*t+8/5)+4/3*sin(15*t+14/3)+5/3*sin(17*t+11/7)+7/5*sin(18*t+8/5)+5/9*sin(19*t+14/3)+8/5*sin(20*t+8/5)+1/3*sin(22*t+3/2)-3361/8)*theta(75*pi-t)*theta(t-71*pi)+(-3/4*sin(14/9-38*t)-1/3*sin(11/7-35*t)-10/7*sin(10/7-27*t)-5/2*sin(14/9-26*t)-41/7*sin(14/9-23*t)-4/7*sin(11/7-22*t)-45/7*sin(11/7-21*t)-81/10*sin(11/7-19*t)-41/7*sin(11/7-15*t)+2781/20*sin(t+11/7)+369/5*sin(2*t+33/7)+530/7*sin(3*t+33/7)+731/10*sin(4*t+33/7)+208/7*sin(5*t+33/7)+5/4*sin(6*t+37/8)+13/9*sin(7*t+23/5)+24/5*sin(8*t+11/7)+1/5*sin(9*t+2)+38/37*sin(10*t+11/7)+29/5*sin(11*t+33/7)+33/4*sin(12*t+14/3)+2/3*sin(13*t+9/2)+52/5*sin(14*t+33/7)+41/7*sin(16*t+8/5)+63/16*sin(17*t+33/7)+105/13*sin(18*t+8/5)+11/7*sin(20*t+8/5)+62/7*sin(24*t+8/5)+23/5*sin(25*t+11/7)+29/10*sin(28*t+33/7)+9/4*sin(29*t+8/5)+10/7*sin(30*t+11/7)+11/12*sin(31*t+33/7)+1/9*sin(32*t+1/8)+1/6*sin(33*t+13/3)+1/3*sin(34*t+4/3)+8/9*sin(36*t+11/7)+1/33*sin(37*t+25/7)+2/3*sin(39*t+14/9)+1/7*sin(40*t+9/7)-741/5)*theta(71*pi-t)*theta(t-67*pi)+(-6/13*sin(3/2-11*t)-2/5*sin(6/5-10*t)-1/4*sin(4/3-9*t)-7/6*sin(3/2-8*t)-17/9*sin(11/8-4*t)-89/10*sin(3/2-3*t)+72/5*sin(t+13/8)+92/13*sin(2*t+8/5)+5/4*sin(5*t+9/5)+6/5*sin(6*t+37/8)+1/5*sin(7*t+5/7)+1/7*sin(12*t+12/5)+1305/7)*theta(67*pi-t)*theta(t-63*pi)+(-9/7*sin(2/7-11*t)-4/3*sin(1/13-9*t)-6/5*sin(1/16-7*t)-12/11*sin(4/3-6*t)-265/33*sin(1/3-3*t)+81/10*sin(t+28/27)+62/7*sin(2*t+19/5)+39/7*sin(4*t+9/5)+116/23*sin(5*t+1/4)+9/7*sin(8*t+13/4)+3/7*sin(10*t+26/7)+4/5*sin(12*t+16/5)+319/4)*theta(63*pi-t)*theta(t-59*pi)+(-2/5*sin(1/4-11*t)-1/4*sin(1/3-9*t)-11/10*sin(1-7*t)-26/5*sin(1-3*t)+113/14*sin(t+5/6)+57/7*sin(2*t+24/7)+12/5*sin(4*t+35/8)+8/7*sin(5*t+29/10)+3/8*sin(6*t+4/3)+16/15*sin(8*t+11/6)+2/3*sin(10*t+11/7)+1/4*sin(12*t+2)-371/8)*theta(59*pi-t)*theta(t-55*pi)+(-3/5*sin(1/4-12*t)-3/4*sin(1/6-10*t)-5/6*sin(1/5-8*t)+299/7*sin(t+11/5)+73/8*sin(2*t+3)+7/2*sin(3*t+35/12)+15/8*sin(4*t+1/6)+9/5*sin(5*t+16/5)+6/7*sin(6*t+1/4)+8/5*sin(7*t+16/5)+sin(9*t+23/7)+5/7*sin(11*t+16/5)-479/5)*theta(55*pi-t)*theta(t-51*pi)+(-28/5*sin(2/5-9*t)-267/8*sin(6/5-2*t)+5001/20*sin(t+35/8)+97/3*sin(3*t+1/3)+226/9*sin(4*t+11/5)+50/3*sin(5*t+3/8)+61/4*sin(6*t+4/3)+49/5*sin(7*t+1/3)+44/5*sin(8*t+4/5)+141/35*sin(10*t+9/8)+77/38*sin(11*t+1)+18/7*sin(12*t+5/8)-537/5)*theta(51*pi-t)*theta(t-47*pi)+(-28/27*sin(2/7-11*t)-6/5*sin(1/8-7*t)-41/6*sin(9/7-5*t)-46/5*sin(3/4-3*t)-161/6*sin(1/3-2*t)+1/4*sin(9*t)+385/6*sin(t+21/5)+37/6*sin(4*t+17/7)+13/5*sin(6*t+9/4)+10/7*sin(8*t+9/4)+3/4*sin(10*t+2/3)+1/2*sin(12*t+5/11)+846/5)*theta(47*pi-t)*theta(t-43*pi)+(-17/11*sin(5/6-22*t)-7/4*sin(1/5-19*t)-6/5*sin(7/5-15*t)-74/25*sin(2/3-8*t)-31/4*sin(9/8-6*t)-33/2*sin(11/10-4*t)-166/5*sin(9/10-2*t)+293/4*sin(t+23/6)+61/4*sin(3*t+31/10)+22/5*sin(5*t+23/9)+83/11*sin(7*t+5/4)+40/7*sin(9*t+4/7)+3/5*sin(10*t+13/4)+17/8*sin(11*t+9/8)+21/5*sin(12*t+22/7)+4/3*sin(13*t+6/5)+16/7*sin(14*t+49/16)+23/12*sin(16*t+15/4)+3/7*sin(17*t+9/5)+1/3*sin(18*t+22/5)+3*sin(20*t+30/7)+3*sin(21*t+10/7)+8/5*sin(23*t+3/5)+13/4*sin(24*t+25/6)-2410/7)*theta(43*pi-t)*theta(t-39*pi)+(-11/4*sin(5/4-22*t)-11/4*sin(2/5-17*t)-9/4*sin(3/5-10*t)-61/7*sin(5/4-8*t)+1250/9*sin(t+8/5)+203/4*sin(2*t+35/12)+139/9*sin(3*t+14/9)+103/6*sin(4*t+15/4)+79/10*sin(5*t+3/2)+208/19*sin(6*t+30/7)+71/12*sin(7*t+5/11)+8/3*sin(9*t+2/3)+5*sin(11*t+12/7)+21/11*sin(12*t+1/7)+19/8*sin(13*t+5/2)+37/36*sin(14*t+22/7)+5/2*sin(15*t+22/7)+5/4*sin(16*t+19/10)+11/5*sin(18*t+13/3)+1/3*sin(19*t+14/15)+13/9*sin(20*t+13/4)+10/3*sin(21*t+5/6)+15/7*sin(23*t+3)+13/12*sin(24*t+14/9)+806/5)*theta(39*pi-t)*theta(t-35*pi)+(-4/3*sin(4/9-8*t)+881/20*sin(t+1/7)+409/8*sin(2*t+24/7)+313/12*sin(3*t+11/3)+319/20*sin(4*t+21/5)+23/7*sin(5*t+11/4)+11/5*sin(6*t+4)+13/4*sin(7*t+13/12)+26/9*sin(9*t+2)+8/5*sin(10*t+71/35)+7/5*sin(11*t+13/7)+1/5*sin(12*t+11/8)+2619/8)*theta(35*pi-t)*theta(t-31*pi)+(-11/10*sin(3/7-6*t)-28/5*sin(3/4-4*t)-89/4*sin(2/3-3*t)-740/13*sin(5/8-2*t)+174/7*sin(t+15/7)+15/4*sin(5*t+19/9)+9/4*sin(7*t+3/2)+7/5*sin(8*t+1/5)+11/7*sin(9*t+9/5)+sin(10*t+23/5)+5/8*sin(11*t+13/4)+2/5*sin(12*t+24/7)-1777/5)*theta(31*pi-t)*theta(t-27*pi)+(-5/7*sin(3/4-15*t)-4/5*sin(1/3-13*t)-10/7*sin(1/17-11*t)-26/25*sin(1/7-7*t)-5/3*sin(3/4-6*t)+1345/14*sin(t+21/5)+55/3*sin(2*t+25/12)+27/4*sin(3*t+11/4)+17/4*sin(4*t+7/4)+13/12*sin(5*t+37/12)+8/5*sin(8*t+145/36)+7/8*sin(9*t+2/5)+6/5*sin(10*t+32/9)+sin(12*t+17/6)+7/8*sin(14*t+13/5)+5/9*sin(16*t+12/7)+333/5)*theta(27*pi-t)*theta(t-23*pi)+(-5/4*sin(3/7-8*t)+379/3*sin(t+29/7)+93/5*sin(2*t+7/3)+89/6*sin(3*t+10/3)+10/3*sin(4*t+14/9)+16/3*sin(5*t+13/5)+16/7*sin(6*t+31/16)+21/11*sin(7*t+17/7)+7/4*sin(9*t+11/5)+5/7*sin(10*t+18/5)+4/5*sin(11*t+17/7)+2/3*sin(12*t+17/7)-860/7)*theta(23*pi-t)*theta(t-19*pi)+(-2/7*sin(3/2-19*t)-16/7*sin(5/6-10*t)-12/5*sin(1/6-6*t)+486/7*sin(t+4/5)+230/11*sin(2*t+14/3)+7/3*sin(3*t+7/4)+3*sin(4*t+7/3)+74/15*sin(5*t+5/7)+63/31*sin(7*t+1/22)+8/9*sin(8*t+5/2)+7/4*sin(9*t+25/6)+3/7*sin(11*t+3/5)+1/2*sin(12*t+18/5)+1/2*sin(13*t+5/4)+1/5*sin(14*t+4/5)+5/9*sin(15*t+3/5)+1/16*sin(16*t+13/6)+5/11*sin(17*t+3/4)+1/3*sin(18*t+9/5)+1/4*sin(20*t+23/5)+515/2)*theta(19*pi-t)*theta(t-15*pi)+(-5/8*sin(1/26-12*t)-37/5*sin(2/3-9*t)-21/11*sin(5/4-5*t)-85/4*sin(3/4-4*t)-139/6*sin(7/5-3*t)+1614/19*sin(t+17/5)+181/6*sin(2*t+21/5)+49/3*sin(6*t+3/5)+67/7*sin(7*t+23/5)+51/5*sin(8*t+11/6)+26/7*sin(10*t+11/3)+5*sin(11*t+1/2)+1031/5)*theta(15*pi-t)*theta(t-11*pi)+(-7/8*sin(2/5-11*t)-13/7*sin(7/5-5*t)+152/7*sin(t+25/6)+82/7*sin(2*t+3/5)+40/3*sin(3*t+7/5)+133/22*sin(4*t+63/16)+3*sin(6*t+34/11)+19/3*sin(7*t+11/10)+17/3*sin(8*t+5/2)+10/3*sin(9*t+4/3)+19/5*sin(10*t+12/5)+13/6*sin(12*t+18/5)+1467/8)*theta(11*pi-t)*theta(t-7*pi)+(-12/13*sin(4/3-10*t)-6/5*sin(1/5-9*t)-13/8*sin(6/5-7*t)-7/5*sin(1/4-5*t)-79/5*sin(1/4-3*t)-811/18*sin(1/6-t)+211/7*sin(2*t+5/11)+29/6*sin(4*t+17/7)+65/8*sin(6*t+23/7)+13/9*sin(8*t+27/7)+12/7*sin(11*t+5/11)+10/9*sin(12*t+17/5)-637/3)*theta(7*pi-t)*theta(t-3*pi)+(-1/3*sin(5/6-60*t)-4/9*sin(3/4-56*t)-5/8*sin(4/7-53*t)-10/7*sin(5/4-51*t)-11/7*sin(1/26-47*t)-10/7*sin(1/24-39*t)-23/9*sin(22/21-32*t)-9/7*sin(3/4-30*t)-11/4*sin(4/5-26*t)-23/6*sin(33/32-17*t)-20/3*sin(1/4-16*t)-45/7*sin(2/7-14*t)-67/5*sin(3/5-12*t)-8/3*sin(9/10-11*t)-82/27*sin(6/5-10*t)+7679/12*sin(t+17/11)+715/4*sin(2*t+10/3)+1728/19*sin(3*t+22/5)+335/7*sin(4*t+15/4)+345/7*sin(5*t+32/7)+143/5*sin(6*t+7/3)+223/5*sin(7*t+14/3)+45/7*sin(8*t+10/7)+74/5*sin(9*t+3/8)+7/2*sin(13*t+1/3)+45/8*sin(15*t+23/6)+38/7*sin(18*t+17/8)+16/7*sin(19*t+41/9)+1/5*sin(20*t+2)+25/13*sin(21*t+2/5)+13/4*sin(22*t+22/9)+2*sin(23*t+12/5)+5/6*sin(24*t+1/4)+16/5*sin(25*t+21/20)+19/4*sin(27*t+18/7)+13/3*sin(28*t+1/5)+3/5*sin(29*t+13/7)+13/5*sin(31*t+8/5)+7/4*sin(33*t+19/6)+10/7*sin(34*t+19/8)+22/7*sin(35*t+1/16)+19/5*sin(36*t+17/4)+8/3*sin(37*t+9/4)+7/5*sin(38*t+19/7)+11/5*sin(40*t+49/12)+19/7*sin(41*t+8/3)+9/4*sin(42*t+12/7)+15/8*sin(43*t+1/17)+sin(44*t+19/6)+13/8*sin(45*t+16/7)+11/6*sin(46*t+5/3)+1/10*sin(48*t+25/7)+2/5*sin(49*t+13/5)+3/2*sin(50*t+1)+3/5*sin(52*t+5/2)+11/12*sin(54*t+61/15)+1/3*sin(55*t+21/11)+8/7*sin(57*t+14/3)+11/7*sin(58*t+13/4)+sin(59*t+8/7)+467/7)*theta(3*pi-t)*theta(t+pi))*theta(sqrt(sgn(sin(t/2))))
miku.y.R – Hatsune Miku equation y(t)
y <- function(t) ((-4/5*sin(11/7-12*t)-1/6*sin(14/9-11*t)-13/5*sin(11/7-8*t)-1/5*sin(3/2-7*t)-18/7*sin(11/7-5*t)-161/9*sin(11/7-t)+1/2*sin(2*t+11/7)+54/7*sin(3*t+11/7)+13/5*sin(4*t+33/7)+6/7*sin(6*t+11/7)+3/4*sin(9*t+8/5)+5/7*sin(10*t+8/5)-1582/5)*theta(131*pi-t)*theta(t-127*pi)+(-87/4*sin(11/7-t)+37/5*sin(2*t+11/7)+5/7*sin(3*t+8/5)+17/11*sin(4*t+11/7)+2/7*sin(5*t+8/5)+7/8*sin(6*t+11/7)+1/7*sin(7*t+8/5)+3/7*sin(8*t+8/5)+1/36*sin(9*t+14/3)+1/6*sin(10*t+8/5)+1/6*sin(11*t+33/7)-139/2)*theta(127*pi-t)*theta(t-123*pi)+(-113/9*sin(11/7-t)+75/4*sin(2*t+8/5)+16/7*sin(3*t+8/5)+19/4*sin(4*t+8/5)+5/4*sin(5*t+8/5)+7/4*sin(6*t+8/5)+1/5*sin(7*t+7/4)+11/12*sin(8*t+8/5)+1/3*sin(9*t+14/3)+3/4*sin(10*t+8/5)+1/5*sin(11*t+13/8)+4/7*sin(12*t+8/5)-911/8)*theta(123*pi-t)*theta(t-119*pi)+(-37/7*sin(11/7-37*t)-2/7*sin(11/12-30*t)-27/7*sin(3/2-20*t)-4/5*sin(4/5-17*t)-375/8*sin(14/9-2*t)+927/8*sin(t+33/7)+395/6*sin(3*t+14/3)+966/5*sin(4*t+33/7)+2992/5*sin(5*t+33/7)+7825/24*sin(6*t+11/7)+754/7*sin(7*t+11/7)+227/3*sin(8*t+17/11)+109/2*sin(9*t+8/5)+318/11*sin(10*t+3/2)+390/11*sin(11*t+8/5)+401/11*sin(12*t+14/9)+86/5*sin(13*t+11/7)+107/7*sin(14*t+17/11)+143/6*sin(15*t+3/2)+642/7*sin(16*t+11/7)+95/9*sin(18*t+3/2)+4*sin(19*t+7/4)+17/3*sin(21*t+9/5)+19/5*sin(22*t+4/3)+3/2*sin(23*t+31/7)+14/3*sin(24*t+7/5)+85/9*sin(25*t+8/5)+34/5*sin(26*t+11/7)+568/21*sin(27*t+33/7)+3/8*sin(28*t+19/6)+23/4*sin(29*t+23/5)+25/8*sin(31*t+5/3)+11/8*sin(32*t+13/12)+1/5*sin(33*t+5/2)+13/3*sin(34*t+11/7)+2*sin(35*t+7/4)+9/4*sin(36*t+33/7)+34/3*sin(38*t+11/7)+12/5*sin(39*t+10/7)+20/3*sin(40*t+3/2)+17/4*sin(41*t+14/9)+7/6*sin(42*t+4/3)-5377/8)*theta(119*pi-t)*theta(t-115*pi)+(-39/8*sin(11/7-21*t)-171/10*sin(11/7-17*t)-199/10*sin(11/7-13*t)-131/7*sin(11/7-10*t)-247/5*sin(11/7-8*t)-109/8*sin(14/9-5*t)+125/3*sin(t+11/7)+213/5*sin(2*t+11/7)+17/4*sin(3*t+3/2)+185/4*sin(4*t+8/5)+98/5*sin(6*t+8/5)+47/4*sin(7*t+8/5)+sin(9*t+19/5)+167/9*sin(11*t+11/7)+165/4*sin(12*t+8/5)+14/3*sin(14*t+14/3)+11/5*sin(15*t+5/3)+11/12*sin(16*t+14/9)+41/9*sin(18*t+8/5)+2/5*sin(19*t+7/4)+10/3*sin(20*t+11/7)+27/5*sin(22*t+8/5)+3815/9)*theta(115*pi-t)*theta(t-111*pi)+(-18/5*sin(10/7-41*t)-8/9*sin(7/6-40*t)-47/8*sin(11/7-37*t)-53/7*sin(16/11-35*t)-47/7*sin(13/9-34*t)-52/7*sin(3/2-33*t)-3/4*sin(5/4-32*t)-47/7*sin(11/7-29*t)-63/16*sin(11/7-27*t)-19/18*sin(4/3-26*t)-8/9*sin(3/2-25*t)-43/3*sin(13/9-22*t)-33*sin(14/9-21*t)-5/2*sin(7/6-20*t)-389/26*sin(3/2-19*t)-15/4*sin(3/2-18*t)-73/5*sin(14/9-14*t)-173/4*sin(14/9-13*t)-13/4*sin(3/2-10*t)-141/4*sin(14/9-9*t)-443/5*sin(11/7-8*t)-756/5*sin(14/9-7*t)-788/3*sin(11/7-6*t)-337*sin(11/7-5*t)-168*sin(11/7-3*t)-592/5*sin(11/7-t)+927/8*sin(2*t+33/7)+1742/3*sin(4*t+8/5)+46/7*sin(11*t+14/3)+241/4*sin(12*t+8/5)+38/3*sin(15*t+11/7)+94/7*sin(16*t+8/5)+19/5*sin(17*t+5/3)+23/7*sin(23*t+8/5)+18/5*sin(24*t+13/8)+78/11*sin(28*t+14/9)+23/7*sin(30*t+8/5)+7*sin(31*t+5/3)+4/7*sin(36*t+6/7)+9/8*sin(38*t+11/8)+7/2*sin(39*t+12/7)+8/7*sin(42*t+3/2)-7295/12)*theta(111*pi-t)*theta(t-107*pi)+(-6/11*sin(3/8-61*t)-4/7*sin(5/6-43*t)-2/5*sin(16/17-15*t)-19*sin(3/2-7*t)-132/7*sin(11/7-t)+43/11*sin(2*t+22/5)+64*sin(3*t+3/2)+195/7*sin(4*t+32/7)+272/5*sin(5*t+14/3)+212/5*sin(6*t+3/2)+81*sin(8*t+10/7)+111/5*sin(9*t+6/5)+356/9*sin(10*t+7/5)+46/5*sin(11*t+8/7)+11/4*sin(12*t+41/10)+23/7*sin(13*t+33/7)+11/6*sin(14*t+57/14)+25/8*sin(16*t+4/3)+1/7*sin(17*t+1)+4/3*sin(18*t+30/7)+1/3*sin(19*t+5/6)+2/5*sin(20*t+19/10)+8/5*sin(21*t+14/3)+25/7*sin(22*t+4/3)+26/5*sin(23*t+31/7)+5/3*sin(24*t+11/7)+13/8*sin(25*t+1/3)+27/5*sin(26*t+10/9)+19/4*sin(27*t+4/5)+8/3*sin(28*t+16/15)+25/13*sin(29*t+5/8)+7/6*sin(30*t+11/8)+15/7*sin(31*t+17/4)+4/7*sin(32*t+3/2)+2/5*sin(33*t+2/3)+1/21*sin(34*t+26/7)+1/3*sin(35*t+4/5)+1/5*sin(36*t+21/10)+4/3*sin(37*t+25/6)+7/8*sin(38*t+6/5)+3/5*sin(39*t+14/3)+2/5*sin(40*t+12/7)+1/2*sin(41*t+1/5)+sin(42*t+11/3)+19/9*sin(44*t+3/4)+5/2*sin(45*t+1/2)+17/9*sin(46*t+2/3)+4/3*sin(47*t+33/8)+5/6*sin(48*t+29/8)+12/11*sin(49*t+1/2)+15/8*sin(50*t+5/7)+4/3*sin(51*t+19/5)+13/7*sin(52*t+11/3)+36/35*sin(53*t+4/9)+13/7*sin(54*t+5/8)+5/4*sin(55*t+26/7)+15/16*sin(56*t+11/3)+11/7*sin(57*t+4/9)+3/4*sin(58*t+10/3)+5/4*sin(59*t+26/7)+5/3*sin(60*t+4/7)-6181/10)*theta(107*pi-t)*theta(t-103*pi)+(-1/4*sin(3/2-20*t)-2/3*sin(3/2-17*t)-9/10*sin(3/2-16*t)-1/9*sin(16/15-14*t)-24/5*sin(14/9-13*t)-1/9*sin(1/4-12*t)-8/9*sin(3/2-11*t)-1/12*sin(4/3-10*t)-8/3*sin(11/7-9*t)-11/3*sin(3/2-8*t)-279/20*sin(11/7-7*t)-119/24*sin(14/9-6*t)-119/10*sin(11/7-3*t)-6/7*sin(11/7-t)+107/6*sin(2*t+11/7)+104/7*sin(4*t+8/5)+4/7*sin(5*t+8/5)+11/8*sin(15*t+8/5)+15/8*sin(18*t+8/5)+1/3*sin(19*t+14/3)+1531/8)*theta(103*pi-t)*theta(t-99*pi)+(-1/8*sin(11/7-11*t)-27/11*sin(11/7-9*t)-14/13*sin(11/7-7*t)-9/5*sin(11/7-5*t)-88/7*sin(11/7-3*t)+103/7*sin(t+11/7)+26/5*sin(2*t+33/7)+8*sin(4*t+11/7)+15/16*sin(6*t+8/5)+10/3*sin(8*t+11/7)+1/6*sin(10*t+14/3)+6/11*sin(12*t+11/7)-219/5)*theta(99*pi-t)*theta(t-95*pi)+(-151/19*sin(11/7-10*t)-17/2*sin(11/7-8*t)-44/5*sin(11/7-2*t)+13/5*sin(t+8/5)+1/3*sin(3*t+5/3)+31/4*sin(4*t+8/5)+55/18*sin(5*t+8/5)+68/9*sin(6*t+8/5)+3/5*sin(7*t+3/2)+19/10*sin(9*t+11/7)+17/3*sin(11*t+8/5)+11/7*sin(12*t+8/5)+2572/5)*theta(95*pi-t)*theta(t-91*pi)+(-20/3*sin(14/9-11*t)-1/2*sin(4/3-9*t)-207/13*sin(14/9-8*t)-29/14*sin(10/7-7*t)-13/2*sin(14/9-6*t)-3/2*sin(13/9-5*t)-39/2*sin(14/9-4*t)-467/11*sin(11/7-3*t)+215/18*sin(t+8/5)+417/19*sin(2*t+11/7)+23/4*sin(10*t+8/5)+27/8*sin(12*t+11/7)+6349/12)*theta(91*pi-t)*theta(t-87*pi)+(5*sin(t+11/7)+1/6*sin(2*t+33/7)+sin(3*t+11/7)+1/3*sin(4*t+8/5)+2/3*sin(5*t+11/7)+2209/10)*theta(87*pi-t)*theta(t-83*pi)+(-121/7*sin(11/7-t)+33/5*sin(2*t+11/7)+2/7*sin(3*t+33/7)+4/5*sin(4*t+11/7)+4/5*sin(5*t+33/7)+3/7*sin(6*t+11/7)+1/13*sin(7*t+8/5)+2672/11)*theta(83*pi-t)*theta(t-79*pi)+(-6/13*sin(10/7-26*t)-2/3*sin(14/9-25*t)-11/8*sin(14/9-24*t)-7/5*sin(11/7-18*t)-16/17*sin(11/7-15*t)-14/3*sin(11/7-13*t)-129/13*sin(11/7-7*t)-87/5*sin(11/7-3*t)+106/3*sin(t+11/7)+101/5*sin(2*t+11/7)+31/6*sin(4*t+8/5)+14/3*sin(5*t+11/7)+46*sin(6*t+8/5)+19/5*sin(8*t+33/7)+10/7*sin(9*t+8/5)+24/5*sin(10*t+11/7)+9/8*sin(11*t+14/9)+23/4*sin(12*t+8/5)+3*sin(14*t+8/5)+37/7*sin(16*t+8/5)+1/8*sin(17*t+41/9)+7/3*sin(19*t+8/5)+1/5*sin(20*t+14/9)+4/7*sin(21*t+14/3)+19/6*sin(22*t+8/5)+2/3*sin(23*t+33/7)+1/2*sin(27*t+13/8)+1/8*sin(28*t+11/8)+1/4*sin(29*t+32/7)+1/2*sin(30*t+8/5)-5258/7)*theta(79*pi-t)*theta(t-75*pi)+(-4/3*sin(14/9-19*t)-16/7*sin(11/7-7*t)-71/8*sin(11/7-t)+574/5*sin(2*t+11/7)+16/5*sin(3*t+14/3)+162/5*sin(4*t+11/7)+79/10*sin(5*t+8/5)+40/9*sin(6*t+11/7)+5/4*sin(8*t+5/3)+13/5*sin(9*t+33/7)+100/11*sin(10*t+11/7)+36/5*sin(11*t+11/7)+9/5*sin(12*t+14/3)+19/3*sin(13*t+33/7)+26/5*sin(14*t+11/7)+2*sin(15*t+11/7)+34/11*sin(16*t+14/3)+7/8*sin(17*t+8/5)+29/7*sin(18*t+11/7)+1/2*sin(20*t+23/5)+sin(21*t+8/5)+13/14*sin(22*t+11/7)-1976/3)*theta(75*pi-t)*theta(t-71*pi)+(-2/3*sin(14/9-39*t)-1/7*sin(24/23-38*t)-1/4*sin(1/39-32*t)-13/4*sin(3/2-28*t)-1/4*sin(9/7-24*t)-23/7*sin(11/7-23*t)-8/5*sin(3/2-19*t)-85/3*sin(11/7-15*t)-107/4*sin(11/7-12*t)-7/4*sin(3/2-9*t)-53/4*sin(11/7-5*t)+53/8*sin(t+33/7)+221/4*sin(2*t+11/7)+33/4*sin(3*t+11/7)+64/7*sin(4*t+11/7)+69/4*sin(6*t+11/7)+91/5*sin(7*t+11/7)+45/4*sin(8*t+11/7)+88/5*sin(10*t+8/5)+5/2*sin(11*t+3/2)+35/3*sin(13*t+8/5)+4/5*sin(14*t+2)+23/3*sin(16*t+8/5)+59/12*sin(17*t+14/3)+43/6*sin(18*t+11/7)+29/5*sin(20*t+8/5)+30/7*sin(21*t+11/7)+6/5*sin(22*t+8/5)+23/9*sin(25*t+8/5)+53/6*sin(26*t+11/7)+15/4*sin(27*t+8/5)+1/13*sin(29*t+5/4)+1/4*sin(30*t+9/5)+30/7*sin(31*t+8/5)+9/4*sin(33*t+11/7)+24/7*sin(34*t+8/5)+9/4*sin(35*t+11/7)+2/3*sin(36*t+10/7)+5/8*sin(37*t+32/7)+18/5*sin(40*t+8/5)-4188/7)*theta(71*pi-t)*theta(t-67*pi)+(-6/7*sin(4/3-10*t)-3/4*sin(11/7-8*t)-11/6*sin(4/3-7*t)-7/2*sin(11/7-6*t)-64/9*sin(3/2-4*t)+1/6*sin(11*t)+7/5*sin(t+13/9)+9*sin(2*t+5/3)+7*sin(3*t+8/5)+sin(5*t+11/8)+1/5*sin(9*t+23/6)+1/3*sin(12*t+23/5)+116/23)*theta(67*pi-t)*theta(t-63*pi)+(-9/5*sin(9/10-7*t)-41/5*sin(7/5-5*t)-22/3*sin(1/5-4*t)+53/7*sin(t+2/7)+37/3*sin(2*t+7/3)+59/7*sin(3*t+21/5)+9/5*sin(6*t+17/5)+3/7*sin(8*t+23/6)+1/4*sin(9*t+8/5)+2/5*sin(10*t+12/7)+2/5*sin(11*t+105/26)+3/7*sin(12*t+5/3)+1265/4)*theta(63*pi-t)*theta(t-59*pi)+(-1/2*sin(3/4-12*t)-6/5*sin(1/2-10*t)-6/7*sin(3/7-8*t)-11/5*sin(1/2-6*t)-28/3*sin(1/2-t)+57/5*sin(2*t+19/9)+9*sin(3*t+17/5)+17/4*sin(4*t+43/14)+55/14*sin(5*t+7/4)+21/11*sin(7*t+19/6)+4/9*sin(9*t+17/6)+4/5*sin(11*t+17/5)+1448/5)*theta(59*pi-t)*theta(t-55*pi)+(-6/13*sin(3/5-12*t)-6/11*sin(9/10-10*t)-4/7*sin(15/16-8*t)-20/19*sin(8/7-6*t)-53/7*sin(3/8-2*t)+827/14*sin(t+11/7)+8*sin(3*t+19/10)+7/4*sin(4*t+35/8)+12/5*sin(5*t+12/5)+9/7*sin(7*t+7/3)+8/9*sin(9*t+21/8)+3/5*sin(11*t+11/4)+126/5)*theta(55*pi-t)*theta(t-51*pi)+(-11/5*sin(1/3-12*t)-1/2*sin(8/9-6*t)-1827/5*sin(2/3-t)+311/5*sin(2*t+12/5)+1065/38*sin(3*t+10/7)+59/4*sin(4*t+16/5)+343/19*sin(5*t+11/6)+132/19*sin(7*t+8/3)+55/6*sin(8*t+11/8)+26/5*sin(9*t+1/2)+9/4*sin(10*t+1/5)+14/3*sin(11*t+1/5)-1115/3)*theta(51*pi-t)*theta(t-47*pi)+(-11/5*sin(7/8-10*t)-sin(10/9-6*t)+285/4*sin(t+14/5)+61*sin(2*t+9/2)+199/10*sin(3*t+19/6)+430/39*sin(4*t+7/4)+21/5*sin(5*t+5/4)+11/8*sin(7*t+3/2)+3/7*sin(8*t+6/5)+12/5*sin(9*t+1/5)+9/8*sin(11*t+16/5)+3/5*sin(12*t+25/8)+51/5)*theta(47*pi-t)*theta(t-43*pi)+(-17/8*sin(1/4-20*t)-24/23*sin(1/6-16*t)-178/7*sin(5/4-3*t)-242/3*sin(1/3-2*t)-1228/3*sin(6/5-t)+43/2*sin(4*t+1/2)+49/5*sin(5*t+7/8)+9*sin(6*t+1/2)+13/4*sin(7*t+8/5)+18/5*sin(8*t+13/5)+27/5*sin(9*t+25/13)+4/7*sin(10*t+25/7)+2*sin(11*t+32/9)+6/5*sin(12*t+13/4)+7/5*sin(13*t+19/5)+3/5*sin(14*t+2/7)+9/7*sin(15*t+9/2)+6/5*sin(17*t+31/8)+7/8*sin(18*t+1/6)+15/14*sin(19*t+16/7)+11/6*sin(21*t+10/3)+17/18*sin(22*t+5/11)+4/5*sin(23*t+18/7)+5/3*sin(24*t+1/30)-5897/5)*theta(43*pi-t)*theta(t-39*pi)+(-4/7*sin(1/4-24*t)-8/5*sin(2/5-21*t)-1/2*sin(10/9-19*t)-2*sin(17/11-17*t)-13/7*sin(3/7-12*t)-27/13*sin(2/5-11*t)-173/6*sin(3/5-3*t)-3245/8*sin(10/11-t)+237/4*sin(2*t+1/5)+45/2*sin(4*t+5/3)+61/6*sin(5*t+7/5)+37/5*sin(6*t+2)+14/5*sin(7*t+13/3)+17/4*sin(8*t+31/8)+17/5*sin(9*t+4)+19/18*sin(10*t+7/8)+14/13*sin(13*t+23/7)+11/6*sin(14*t+4/3)+5/6*sin(15*t+28/9)+9/5*sin(16*t+16/17)+10/7*sin(18*t+12/5)+6/5*sin(20*t+15/7)+14/9*sin(22*t+19/5)+4/5*sin(23*t+21/11)-4829/4)*theta(39*pi-t)*theta(t-35*pi)+(-6/5*sin(3/2-11*t)-2/5*sin(2/5-6*t)-27/11*sin(1/4-5*t)-534/5*sin(4/3-t)+511/10*sin(2*t+69/34)+37/5*sin(3*t+15/7)+45/8*sin(4*t+7/3)+6/5*sin(7*t+35/8)+23/11*sin(8*t+1/4)+14/15*sin(9*t+1/5)+9/4*sin(10*t+1/2)+3/4*sin(12*t+5/4)-5623/3)*theta(35*pi-t)*theta(t-31*pi)+(-3*sin(1/8-9*t)-11/5*sin(1-8*t)-17/5*sin(1/13-7*t)-3/4*sin(2/5-6*t)+601/6*sin(t+9/2)+156/5*sin(2*t+19/20)+134/9*sin(3*t+21/5)+11*sin(4*t+29/8)+20/3*sin(5*t+17/5)+5/8*sin(10*t+23/6)+7/5*sin(11*t+3/7)+2*sin(12*t+17/7)-31740/17)*theta(31*pi-t)*theta(t-27*pi)+(-6/5*sin(4/3-11*t)-11/10*sin(7/5-10*t)-29/10*sin(6/5-9*t)-3/7*sin(17/16-5*t)-221/5*sin(13/14-t)+287/11*sin(2*t+2)+55/3*sin(3*t+32/11)+58/5*sin(4*t+14/5)+10/9*sin(6*t+19/8)+8/7*sin(7*t+1/3)+2/3*sin(8*t+15/8)+4/9*sin(12*t+7/4)+3/8*sin(13*t+29/7)+3/8*sin(14*t+11/5)+3/8*sin(15*t+3/5)+3/5*sin(16*t+13/12)+110)*theta(27*pi-t)*theta(t-23*pi)+(-9/7*sin(3/7-11*t)-131/13*sin(33/32-2*t)+1591/6*sin(t+9/2)+183/7*sin(3*t+65/16)+3*sin(4*t+13/3)+27/4*sin(5*t+25/7)+9/4*sin(6*t+79/20)+13/8*sin(7*t+35/12)+44/15*sin(8*t+38/13)+5/6*sin(9*t+1/21)+12/5*sin(10*t+12/5)+11/5*sin(12*t+2)-1478/7)*theta(23*pi-t)*theta(t-19*pi)+(-43/8*sin(1-6*t)-13*sin(14/9-5*t)-156/7*sin(1/7-t)+61/7*sin(2*t+29/7)+29/8*sin(3*t+11/7)+28/3*sin(4*t+11/4)+38/7*sin(7*t+22/5)+11/8*sin(8*t+14/5)+sin(9*t+17/7)+1/2*sin(10*t+11/10)+5/7*sin(11*t+1/9)+3/5*sin(12*t+7/6)+2/5*sin(13*t+4/7)+1/6*sin(14*t+4)+2/5*sin(15*t+17/4)+12/13*sin(16*t+17/6)+4/9*sin(17*t+30/7)+1/6*sin(18*t+1)+1/5*sin(19*t+32/7)+2/7*sin(20*t+7/2)-4921/6)*theta(19*pi-t)*theta(t-15*pi)+(-31/16*sin(3/4-11*t)-12/7*sin(6/5-7*t)-32/5*sin(1/5-3*t)-51/2*sin(1/2-2*t)-3899/11*sin(1-t)+121/8*sin(4*t+3/4)+34/5*sin(5*t+23/5)+4*sin(6*t+11/7)+35/9*sin(8*t+5/8)+14/5*sin(9*t+17/4)+19/5*sin(10*t+8/5)+14/15*sin(12*t+14/5)-823/2)*theta(15*pi-t)*theta(t-11*pi)+(-37/4*sin(2/5-5*t)-291/7*sin(9/7-t)+43/4*sin(2*t+9/7)+23*sin(3*t+3)+62/7*sin(4*t+1/3)+59/9*sin(6*t+23/6)+53/13*sin(7*t+17/8)+79/10*sin(8*t+4)+16/3*sin(9*t+17/5)+13/5*sin(10*t+22/5)+3/5*sin(11*t+13/6)+12/7*sin(12*t+2/7)+1699/5)*theta(11*pi-t)*theta(t-7*pi)+(-11/7*sin(3/7-11*t)-30/7*sin(5/7-9*t)-1818/7*sin(13/9-t)+247/4*sin(2*t+12/7)+71/5*sin(3*t+3/2)+183/5*sin(4*t+9/5)+58/5*sin(5*t+7/4)+14*sin(6*t+17/9)+17/11*sin(7*t+2/5)+25/13*sin(8*t+11/6)+2/5*sin(10*t+21/11)+8/3*sin(12*t+7/3)-5529/5)*theta(7*pi-t)*theta(t-3*pi)+(-5/3*sin(28/27-55*t)-15/14*sin(1/39-44*t)-30/29*sin(1/2-42*t)-23/12*sin(1/14-38*t)-143/16*sin(4/3-25*t)-41/8*sin(4/3-24*t)-57/4*sin(9/10-21*t)-73/8*sin(16/17-20*t)-47/5*sin(1/6-19*t)-24/5*sin(2/3-18*t)-104/11*sin(3/4-17*t)-18*sin(3/4-16*t)-175/9*sin(3/7-12*t)-523/7*sin(12/11-t)+2909/3*sin(2*t+9/2)+501/5*sin(3*t+1/15)+336/11*sin(4*t+7/2)+447/14*sin(5*t+9/5)+117/4*sin(6*t+105/26)+292/5*sin(7*t+1/6)+7/4*sin(8*t+4/7)+93/5*sin(9*t+3/2)+159/10*sin(10*t+1)+95/3*sin(11*t+1/5)+9/2*sin(13*t+4/7)+11*sin(14*t+1/2)+125/6*sin(15*t+1/12)+67/9*sin(22*t+19/5)+25/6*sin(23*t+2/5)+5*sin(26*t+29/10)+15/7*sin(27*t+1/7)+13/4*sin(28*t+23/6)+14/5*sin(29*t+29/8)+61/10*sin(30*t+10/11)+27/5*sin(31*t+50/11)+32/5*sin(32*t+5/2)+17/6*sin(33*t+9/7)+21/4*sin(34*t+1/6)+17/4*sin(35*t+23/6)+5*sin(36*t+9/5)+11/5*sin(37*t+9/10)+11/7*sin(39*t+18/7)+3/4*sin(40*t+1/2)+12/5*sin(41*t+11/6)+3/2*sin(43*t+11/5)+9/5*sin(45*t+9/4)+6/5*sin(46*t+23/9)+4/5*sin(47*t+21/11)+sin(48*t+10/11)+2/3*sin(49*t+11/6)+52/17*sin(50*t+17/7)+9/5*sin(51*t+1/2)+3/7*sin(52*t+14/3)+23/11*sin(53*t+75/37)+19/8*sin(54*t+7/5)+5/7*sin(56*t+11/4)+5/2*sin(57*t+5/3)+39/19*sin(58*t+1/5)+13/6*sin(59*t+21/5)+7/8*sin(60*t+14/13)-2692/5)*theta(3*pi-t)*theta(t+pi))*theta(sqrt(sgn(sin(t/2))))

Above pair of two functions is the R-ported Hatsune Miku equation. The sgn function is same as the sign function in R. The theta function is also a step function similar to the sign. These functions must accept complex numbers.

I wrote a small code to work with the above Hatsune Miku equation.

# graph Hatsune miku curve
# http://www.wolframalpha.com/input/?i=graph+Hatsune+miku+curve
# http://nlab.itmedia.co.jp/nl/articles/1305/02/news063.html

sgn <- function(x) as.complex(sign(Re(x)))
theta <- function(x) (sgn(x) + 1) / 2

miku <- function(start=0, end=412, n=50000, col=NA, border='grey37') {
  tseq <- as.complex(seq(start, end, length.out=n))
  xseq <- x(tseq)
  yseq <- y(tseq)
  plot(NA, xlim=c(-1200,1200), ylim=c(-2000,600), xlab='', ylab='')
  polygon(xseq, yseq, col=col, border=border)
  #lines(xseq, yseq, col=border)
}

miku.hair <- function() miku(0, 2*pi, 500, '#97d1d3FF', '#0d827fFF')

miku.hair.shadow <- function() miku(340, 412, 5000, NA, '#0d827fFF')

miku.color <- function() {
  miku.hair()
  par(new=T)
  miku.hair.shadow()
  par(new=T)
  miku(start=2*pi,end=340)
}

Try the function in R.

Miku 1. Hatsune Miku equation graph

Miku 1. Hatsune Miku equation graph

Her hair is made of the real domain (0, 2π) of the equation. So, coloring her hair is easy.

Miku 2. Hair colored Hatsune Miku equation graph

Miku 2. Hair colored Hatsune Miku equation graph

You can download the entire source code.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Information

This entry was posted on May 10, 2013 by and tagged , , , , .
The stupidest thing...

Statistics, genetics, programming, academics

ЯтомизоnoR

R, Statistics

%d bloggers like this: