1#!/usr/bin/env gmic 2# File : heart.gmic 3# Author : David Tschumperle 4 5# Entrypoint when run from CLI: 6go nm Heart e[] "" animate 60 7 8# Main function 9go : 10 chromeball64x64 255,20,0 resize2dx[-1] 48 11 split c,-3 12 600,500,1,3,"(y*[0,20,100]+(h-y)*[200,100,200])/h" .x9 13 eval " 14 S = crop(#0); 15 A = crop(#1); 16 for (t = -pi; f = 0, t<3*pi, t+=0.02, 17 draw(#2+f,S,[268-15*[16*(sin(t)^3),13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t)+5],0,0],48,48,1,3,1,A,255); 18 f = (f+1)%10; 19 )" 20 remove[0,1] 21 22# End of file.