Skip to content

Configuration astucieuse de multiframe avec diverses conditions au sein du package animate.

Après beaucoup de lutte, nous avons trouvé la solution à ce revers que certains lecteurs de ce site Web ont présenté. Si vous souhaitez apporter autre chose, n'oubliez pas de partager votre commentaire.

Solution :

Que pensez-vous de cela ?

documentclass[%
]{article}
usepackage[margin=1cm]{geometry}
usepackage{pstricks-add}
usepackage{animate}
usepackage{xintexpr,xintgcd}
pagestyle{empty}

begin{document}

definecolor{digits}{rgb}{0,0,0}  % BLACK
%definecolor{digits}{HTML}{FF7F00} % ORANGE
%definecolor{digits}{rgb}{0.79,0.255,0.329} % BRICKRED

newpsstyle{digits}{linewidth=0.5pt,fillstyle=solid,fillcolor=digits,linecolor=digits}

%% Bringing the digits into an array with 10 elements: 1, 2, 3, 4, ..., 9, 0
%% digits{1} = spies out the digit 0, digits{9} = spies aout digit 8, digits{10} = spies out digit 9,
%% digits{0} = spies out the number of elements = 10
xintAssignArray{%
{% 0
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
}
{% 1
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
}
{% 2
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}
{% 3
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}
{% 4
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}
{% 5
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}
{% 6
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}
{% 7
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
}
{% 8
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}
{% 9
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}
}todigits

begin{center}
begin{animateinline}[%
    controls,
    palindrome,
    begin={begin{pspicture*}(-2,-1)(5,3)},
    end={end{pspicture*}}
    ]{2}% frame rate = 2 image/s
%% Works up to 18 frames then the modulo 10 sets second digit to zero which means it takes the number of the
%% above defined array -- which outputs the number of elements within the array and not the wanted digit ... EUF!!!
multiframe{131}{iA=0+1}{%
%xintifbooliiexpr{iA<10}%
%{rput(0,0){pstilt{85}{digits{iA+1}}}}%
%    {%
    rput(-1.75,0){pstilt{85}{digits{xinttheexpr (1+floor(iA/100))/:10relax}}}
    rput(0,0){pstilt{85}{digits{xinttheexpr (1+floor(iA/10))/:10relax}}}%
    rput(1.75,0){pstilt{85}{digits{xinttheiiexpr 1+(iA/:10)relax}}}%
%    }%
}
end{animateinline}
end{center}
end{document} 

Deuxième variante :

documentclass{article}
usepackage[margin=1cm]{geometry}
usepackage{pstricks-add}
usepackage{animate}
usepackage{xintexpr,xintgcd}
pagestyle{empty}

begin{document}

definecolor{digits}{rgb}{0,0,0}  % BLACK

newpsstyle{digits}{linewidth=0.5pt,fillstyle=solid,fillcolor=digits,linecolor=digits}

newcommand{digitJG}[1]{
ifcase#1
%Zero case.
digitZ
or %case 1
digitI
or %case 2
digitII
or %case 3
digitIII
or %case 4
digitIV
or %case 5
digitV
or %case 6
digitVI
or %case 7
digitVII
or %case 8
digitVIII
or %case 9
digitIX
else
Okay,thats crazy!\
fi
}

defdigitZ{%
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
}

defdigitI{%
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
}

defdigitII{%
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitIII{%
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitIV{%
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitV{%
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitVI{%
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitVII{%
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
}

defdigitVIII{%
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitIX{%
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

begin{center}
begin{animateinline}[%
    controls,
%    palindrome,
    begin={begin{pspicture*}(-2,-1)(5,3)},
    end={end{pspicture*}}
    ]{2}% frame rate = 2 image/s
multiframe{61}{iA=60+-1}{%
xintifbooliiexpr{iA=0}%
{rput(0,0){pstilt{85}{textcolor{red}{bfseriesLARGE READY!}}}}%
    {%
    rput(-1.75,0){pstilt{85}{digitJG{xinttheexpr (floor(iA/100))/:10relax}}}
    rput(0,0){pstilt{85}{digitJG{xinttheexpr (floor(iA/10))/:10relax}}}%
    rput(1.75,0){pstilt{85}{digitJG{xinttheiiexpr (iA/:10)relax}}}%
    }%
}
end{animateinline}
end{center}
end{document}

Une variation

Cliquez pour voir en action

documentclass{article}
usepackage[margin=1cm]{geometry}
usepackage{pstricks-add}
usepackage{animate}
usepackage{xintexpr,xintgcd}
pagestyle{empty}

begin{document}

definecolor{digits}{rgb}{0,0.8,0.2}  % BLACK
definecolor{digitsI}{rgb}{0.15,0.15,0.15}  % BLACK

newpsstyle{digits}{linewidth=0.5pt,fillstyle=solid,fillcolor=digits,linecolor=digits}
newpsstyle{digitsI}{linewidth=0.5pt,fillstyle=solid,fillcolor=digitsI,linecolor=digitsI,opacity=0.3}%linestyle=none,

newcommand{digitJG}[1]{
ifcase#1
%Zero case.
digitZ
or %case 1
digitI
or %case 2
digitII
or %case 3
digitIII
or %case 4
digitIV
or %case 5
digitV
or %case 6
digitVI
or %case 7
digitVII
or %case 8
digitVIII
or %case 9
digitIX
else
Okay,thats crazy!\
fi
}

defdigitZ{%
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digitsI](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitI{%
pspolygon[style=digitsI](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digitsI](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digitsI](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digitsI](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digitsI](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitII{%
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digitsI](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digitsI](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitIII{%
pspolygon[style=digitsI](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digitsI](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitIV{%
pspolygon[style=digitsI](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digitsI](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digitsI](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitV{%
pspolygon[style=digitsI](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digitsI](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitVI{%
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digitsI](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitVII{%
pspolygon[style=digitsI](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digitsI](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digitsI](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digitsI](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitVIII{%
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitIX{%
pspolygon[style=digitsI](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

begin{center}
begin{animateinline}[%
    controls,
%    palindrome,
    begin={begin{pspicture*}(-4,-1)(5,3)},
    end={end{pspicture*}}
    ]{2}% frame rate = 2 image/s
multiframe{61}{iA=60+-1}{%
psframe*(-4,-1)(5,3)
xintifbooliiexpr{iA=0}%
{rput(0.5,1){pstilt{85}{textcolor{red}{bfseriesLARGE READY!}}}}%
    {%
    rput(-1.75,0){pstilt{85}{digitJG{xinttheexpr (floor(iA/100))/:10relax}}}
    rput(0,0){pstilt{85}{digitJG{xinttheexpr (floor(iA/10))/:10relax}}}%
    rput(1.75,0){pstilt{85}{digitJG{xinttheiiexpr (iA/:10)relax}}}%
    }%
}
end{animateinline}
end{center}
end{document} 

Maintenant, c'est l'heure de 24 heures

documentclass{article}
usepackage[margin=1cm]{geometry}
usepackage{pstricks-add}
usepackage{animate}
usepackage{xintexpr,xintgcd}
pagestyle{empty}

begin{document}

definecolor{digits}{rgb}{0,0.8,0.2}  % green
definecolor{warning}{HTML}{FF7F00}   % orange
definecolor{digitsI}{rgb}{0.15,0.15,0.15}  % dark gray

newpsstyle{digits}{linewidth=0.5pt,fillstyle=solid,fillcolor=digits,linecolor=digits}
newpsstyle{digitsI}{linewidth=0.5pt,fillstyle=solid,fillcolor=digitsI,linecolor=digitsI,opacity=0.95}%linestyle=none,

newcommand{digitJG}[1]{
ifcase#1
%Zero case.
digitZ
or %case 1
digitI
or %case 2
digitII
or %case 3
digitIII
or %case 4
digitIV
or %case 5
digitV
or %case 6
digitVI
or %case 7
digitVII
or %case 8
digitVIII
or %case 9
digitIX
else
Okay,thats crazy!\
fi
}

defdigitZ{%
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digitsI](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitI{%
pspolygon[style=digitsI](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digitsI](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digitsI](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digitsI](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digitsI](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitII{%
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digitsI](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digitsI](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitIII{%
pspolygon[style=digitsI](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digitsI](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitIV{%
pspolygon[style=digitsI](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digitsI](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digitsI](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitV{%
pspolygon[style=digitsI](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digitsI](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitVI{%
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digitsI](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitVII{%
pspolygon[style=digitsI](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digitsI](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digitsI](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digitsI](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitVIII{%
pspolygon[style=digits](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

defdigitIX{%
pspolygon[style=digitsI](0,0)(0.1,0.1)(0.1,0.9)(0,1)(0,0)%lu
pspolygon[style=digits](0,1.1)(0.1,1.2)(0.1,2)(0,2.1)(0,1.1)%lo
pspolygon[style=digits](1.3,0)(1.2,0.1)(1.2,0.9)(1.3,1)(1.3,0)%ru
pspolygon[style=digits](1.3,1.1)(1.2,1.2)(1.2,2)(1.3,2.1)(1.3,1.1)%ro
pspolygon[style=digits](0.05,-0.05)(1.25,-0.05)(1.13,0.07)(0.17,0.07)(0.05,-0.05)%u
pspolygon[style=digits](0.05,2.16)(1.25,2.16)(1.13,2.05)(0.17,2.05)(0.05,2.16)%o
pspolygon[style=digits](0.05,1.05)(0.12,0.98)(1.18,0.98)(1.25,1.05)(1.18,1.12)(0.12,1.12)(0.05,1.05)%m
}

begin{center}
begin{animateinline}[%
    controls,
%    palindrome,
    begin={begin{pspicture*}(-9,-1)(5,3)psframe*(-9,-1)(5,3)},
    end={end{pspicture*}}
    ]{2}% frame rate = 2 image/s
multiframe{30}{iA=86370+1}{%
    rput(-7.0,0){pstilt{85}{digitJG{xinttheiiexpr ((iA//3600)/:24)//10relax}}}
    rput(-5.25,0){pstilt{85}{digitJG{xinttheiiexpr ((iA//3600)/:24)/:10relax}}}
    xintifbooliiexpr{iA/:2=0}{rput(-3.65,1){pstilt{85}{Huge color{gray!30} :}}}{}%      colon every second frame
    rput(-3.5,0){pstilt{85}{digitJG{xinttheiiexpr (iA//600)/:6relax}}}
    rput(-1.75,0){pstilt{85}{digitJG{xinttheiiexpr (iA//60)/:10relax}}}
    xintifbooliiexpr{iA/:2=0}{rput(-0.15,1){pstilt{85}{Huge color{gray!30} :}}}{}%      colon every second frame
    rput(0,0){pstilt{85}{digitJG{xinttheiiexpr (iA//10)/:6relax}}}%
    rput(1.75,0){pstilt{85}{digitJG{xinttheiiexpr (iA/:10)relax}}}%
}
newframe
rput(-2,1){pstilt{85}{textcolor{warning}{textsf{bfseriesHuge Only 24 hours!}}}}%
end{animateinline}
end{center}
end{document}

Entrez la description de l'image ici

N'oubliez pas de recommander cette déclaration si elle vous a aidé.



Utilisez notre moteur de recherche

Ricerca
Generic filters

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée.