Un damier en anamorphose conique. J'utilise \psframeA définie dans le fichier.
[pst-anamorphosis.git] / img / serie02 / damier.tex
1 \documentclass[12pt]{article}
2 \usepackage{pst-anamorphosis-add}
3 \usepackage[a4paper]{geometry}
4
5 \makeatletter
6 %%%%%%%\psframeA ---------------------
7 \def\psframeA{\pst@object{psframeA}}
8 \def\psframeA@i(#1){%
9 \@ifnextchar({\psframeA@ii(#1)}{\psframeA@ii(0,0)(#1)}}
10 \def\psframeA@ii(#1)(#2){%
11 \begin@ClosedObj
12 \pst@getcoor{#1}\pst@tempa%
13 \pst@@getcoor{#2}%
14 \def\pst@linetype{2}%
15 \addto@pscode{%
16 \tx@optionsanamorphosis
17 \tx@optionsanamorphosisAdd
18 \pst@tempa
19 \pst@coor
20 /Y2 ED
21 /X2 ED
22 /Y1 ED
23 /X1 ED
24 X1 Y1 tx@anamorphosisPathDict begin Anamorphose end
25 moveto
26 0 0.005 1.0 { %(X1,Y1)->(X2,Y1)
27 /K exch def
28 K X2 mul 1 K sub X1 mul add
29 Y1
30 tx@anamorphosisPathDict begin Anamorphose end
31 lineto
32 } for
33 0 0.005 1.0 { % (X2,Y1)->(X2,Y2)
34 /K exch def
35 X2
36 K Y2 mul 1 K sub Y1 mul add
37 tx@anamorphosisPathDict begin Anamorphose end
38 lineto
39 } for
40 0 0.005 1.0 { % (X2,Y2)->(X1,Y2)
41 /K exch def
42 K X1 mul 1 K sub X2 mul add
43 Y2
44 tx@anamorphosisPathDict begin Anamorphose end
45 lineto
46 } for
47 0 0.005 1.0 { % (X1,Y2)->(X1,Y1)
48 /K exch def
49 X1
50 K Y1 mul 1 K sub Y2 mul add
51 tx@anamorphosisPathDict begin Anamorphose end
52 lineto
53 } for
54 }%
55 \showpointsfalse
56 \end@ClosedObj}
57 \makeatother
58 \begin{document}
59 \begin{center}
60 \begin{pspicture}(-7,-7)(7,7)
61 \psset{type=conical,Rmirror=3}
62 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](-0.25,-0.25)(-0.01,-0.01)
63 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](-0.25,0.25)(-0.01,0.01)
64 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](0.01,0.01)(0.25,0.25)
65 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](0.01,-0.01)(0.25,-0.25)
66 \multido{\ry=-2.75+1,\rY=-2.25+1}{6}{
67 \multido{\n=-2.75+1.00,\N=-2.25+1.00}{7}{%
68 \psframeA[fillstyle=solid,fillcolor=red,linecolor=red](\n,\ry)(\N,\rY)}
69 }
70 \multido{\ry=-3.25+1,\rY=-2.75+1}{3}{
71 \multido{\n=-3.25+1.00,\N=-2.75+1.00}{7}{%
72 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](\n,\ry)(\N,\rY)}
73 }
74 \multido{\ry=0.75+1,\rY=1.25+1}{3}{
75 \multido{\n=-3.25+1.00,\N=-2.75+1.00}{7}{%
76 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](\n,\ry)(\N,\rY)}
77 }
78 \multido{\n=-3.25+1.00,\N=-2.75+1.00}{3}{%
79 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](\n,-0.25)(\N,0.25)}
80 \multido{\n=0.75+1.00,\N=1.25+1.00}{3}{%
81 \psframeA[fillstyle=solid,fillcolor=blue,linecolor=blue](\n,-0.25)(\N,0.25)}
82 \begin{psclip}{\pscircle[fillstyle=solid,fillcolor=white,linestyle=none]{3}}
83 \multido{\ry=-2.75+1,\rY=-2.25+1}{6}{
84 \multido{\n=-2.75+1.00,\N=-2.25+1.00}{6}{%
85 \psframe*[linecolor=red](\n,\ry)(\N,\rY)}
86 }
87 \multido{\ry=-3.25+1,\rY=-2.75+1}{7}{
88 \multido{\n=-3.25+1.00,\N=-2.75+1.00}{7}{%
89 \psframe*[linecolor=blue](\n,\ry)(\N,\rY)}
90 }
91 \pscircle[doubleline=true]{3}
92 \end{psclip}
93 \end{pspicture}
94 \end{center}
95 \end{document}

Licence Creative Commons Les fichiers de Syracuse sont mis à disposition (sauf mention contraire) selon les termes de la
Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International.