Retour

damier.tex

Télécharger le fichier Fichier PDF
Image PNG
\documentclass[12pt]{article}
\usepackage{pst-anamorphosis-add}
\usepackage[a4paper]{geometry}
 
\makeatletter
%%%%%%%\psframeA ---------------------
\def\psframeA{\pst@object{psframeA}}
\def\psframeA@i(#1){%
\@ifnextchar({\psframeA@ii(#1)}{\psframeA@ii(0,0)(#1)}}
\def\psframeA@ii(#1)(#2){%
\begin@ClosedObj
\pst@getcoor{#1}\pst@tempa%
\pst@@getcoor{#2}%
\def\pst@linetype{2}%
\addto@pscode{%
    \tx@optionsanamorphosis
    \tx@optionsanamorphosisAdd
    \pst@tempa
    \pst@coor
    /Y2 ED
    /X2 ED
    /Y1 ED
    /X1 ED
    X1 Y1  tx@anamorphosisPathDict begin Anamorphose end
    moveto
    0 0.005 1.0 { %(X1,Y1)->(X2,Y1)
    /K exch def
    K X2 mul 1 K sub X1 mul add
    Y1
    tx@anamorphosisPathDict begin Anamorphose end
    lineto
    } for
    0 0.005 1.0 { % (X2,Y1)->(X2,Y2)
    /K exch def
    X2
    K Y2 mul 1 K sub Y1 mul add
    tx@anamorphosisPathDict begin Anamorphose end
    lineto
    } for
    0 0.005 1.0 { % (X2,Y2)->(X1,Y2)
    /K exch def
    K X1 mul 1 K sub X2 mul add
    Y2
    tx@anamorphosisPathDict begin Anamorphose end
    lineto
    } for
    0 0.005 1.0 { % (X1,Y2)->(X1,Y1)
    /K exch def
    X1
    K Y1 mul 1 K sub Y2 mul add
    tx@anamorphosisPathDict begin Anamorphose end
    lineto
    } for
}%
\showpointsfalse
\end@ClosedObj}
\makeatother
\begin{document}
\begin{center}
\begin{pspicture}(-7,-7)(7,7)
\psset{type=conical,Rmirror=3}
\psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](-0.25,-0.25)(-0.01,-0.01)
\psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](-0.25,0.25)(-0.01,0.01)
\psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](0.01,0.01)(0.25,0.25)
\psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](0.01,-0.01)(0.25,-0.25)
\multido{\ry=-2.75+1,\rY=-2.25+1}{6}{
\multido{\n=-2.75+1.00,\N=-2.25+1.00}{7}{%
    \psframeA[fillstyle=solid,fillcolor=red,linecolor=red](\n,\ry)(\N,\rY)}
    }
\multido{\ry=-3.25+1,\rY=-2.75+1}{3}{
\multido{\n=-3.25+1.00,\N=-2.75+1.00}{7}{%
    \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](\n,\ry)(\N,\rY)}
    }
\multido{\ry=0.75+1,\rY=1.25+1}{3}{
\multido{\n=-3.25+1.00,\N=-2.75+1.00}{7}{%
    \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](\n,\ry)(\N,\rY)}
    }
\multido{\n=-3.25+1.00,\N=-2.75+1.00}{3}{%
    \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](\n,-0.25)(\N,0.25)}
\multido{\n=0.75+1.00,\N=1.25+1.00}{3}{%
    \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](\n,-0.25)(\N,0.25)}
\begin{psclip}{\pscircle[fillstyle=solid,fillcolor=white,linestyle=none]{3}}
\multido{\ry=-2.75+1,\rY=-2.25+1}{6}{
\multido{\n=-2.75+1.00,\N=-2.25+1.00}{6}{%
    \psframe*[linecolor=red](\n,\ry)(\N,\rY)}
    }
\multido{\ry=-3.25+1,\rY=-2.75+1}{7}{
\multido{\n=-3.25+1.00,\N=-2.75+1.00}{7}{%
    \psframe*[linecolor=blue](\n,\ry)(\N,\rY)}
    }
\pscircle[doubleline=true]{3}
\end{psclip}
\end{pspicture}
\end{center}
\end{document}