Happy Birthday: I love you Kristi

February 23, 2016

I made you this script with love. I hope you have a great birthday season; you deserve more than I know how to give.

♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡

using Plots, FixedSizeArrays
gadfly(c=:red,w=5,leg=false,xticks=nothing,yticks=nothing)

makecurve(x,y) = BezierCurve(P2[(x[i],y[i]) for i in 1:length(x)])
x = [0, 0.5, 1, 0]
y = [1.2, 2, 1, 0]
curve1 = makecurve(x,y)
curve2 = makecurve(-x,y)

p = plot(2, xlim=(-1,1), ylim=(-0.5,2), grid=false, size=(600,600))
anim = Animation()
for t in linspace(0,1,50)
    push!(p, 1, curve1(t)...)
    push!(p, 2, curve2(t)...)
    frame(anim)
end

txt = ["Happy","Birthday", "Season", "!!!!!"]
ys = linspace(1.5,0,length(txt))
for (i,word) in enumerate(txt)
    xs = linspace(-0.7,0.7,length(word))
    for (j,c) in enumerate(word)
        annotate!(xs[j],ys[i],text(c,30))
        for k=1:5; frame(anim); end
    end
end

gif(anim)

♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡