From: Manuel Date: Fri, 21 Oct 2011 09:45:28 +0000 (+0200) Subject: Un damier en anamorphose conique. J'utilise \psframeA définie dans le fichier. X-Git-Url: https://melusine.eu.org/syracuse/G/git/?a=commitdiff_plain;h=220ebfcdf7bb761307bdefae90bd90875fb01f48;p=pst-anamorphosis.git Un damier en anamorphose conique. J'utilise \psframeA définie dans le fichier. --- diff --git a/img/serie02/LISTE.txt b/img/serie02/LISTE.txt index 65f01ba..c4b196f 100644 --- a/img/serie02/LISTE.txt +++ b/img/serie02/LISTE.txt @@ -4,3 +4,4 @@ parapluie.png parapluie.eps sinus.png rayures.png +damier.png diff --git a/img/serie02/damier.pdf b/img/serie02/damier.pdf new file mode 100644 index 0000000..5e22b9e Binary files /dev/null and b/img/serie02/damier.pdf differ diff --git a/img/serie02/damier.png b/img/serie02/damier.png new file mode 100644 index 0000000..13af887 Binary files /dev/null and b/img/serie02/damier.png differ diff --git a/img/serie02/damier.tex b/img/serie02/damier.tex new file mode 100644 index 0000000..8da6d23 --- /dev/null +++ b/img/serie02/damier.tex @@ -0,0 +1,95 @@ +\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} \ No newline at end of file