1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
|
%% $Id: pst-antiprism-doc.tex 729 2018-02-13 17:48:53Z herbert $
\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,headings=small,
headinclude=false,footinclude=false,oneside=true]{pst-doc}
\listfiles
\usepackage[utf8]{inputenc}
\usepackage{pst-antiprism}
\let\pstFV\fileversion
\def\bgImage{\resizebox{7cm}{!}{\begin{pspicture}(-3,-3)(3,3)
\psset{viewpoint=100 60 30 rtp2xyz,Decran=100}
\psAntiprism[a=1,n=15,hue=0 1 0.5 1,
linecolor={[rgb]{0 0 0.5}}]
\end{pspicture}}}
\usepackage{showexpl,listings,xltabular,booktabs,animate}
\lstset{explpreset={pos=l,width=-99pt,overhang=0pt,hsep=\columnsep,vsep=\bigskipamount,rframe={}}}
\usepackage{biblatex}
\addbibresource{\jobname.bib}
\definecolor{Miel} {RGB}{218 179 10}
\definecolor{Maroon} {cmyk}{0 0.87 0.68 0.32}
\begin{document}
\title{\texttt{pst-antiprism}: Drawing an antiprism \\
\small v.\pstFV}
%\docauthor{}
\author{Manuel Luque\\Herbert Voß}
\maketitle
\tableofcontents
\section{Introduction}
An antiprism is a semiregular polyhedron constructed with 2 n-gons and 2n triangles.
The nets are particularly simple, consisting of two n-gons on top and bottom, separated by a
ribbon of 2n triangles, with the two n-gons being offset by one ribbon segment.
The duals of the antiprisms are the trapezohedra.~\cite{weisstein}
The macro \Lcs{psAntiprism} has the following syntax:
\begin{BDef}
\Lcs{psAntiprism}\OptArgs
\end{BDef}
The special optional arguments with its default values are
\begin{xltabular}{\linewidth}{@{} >{\ttfamily}l l X @{}}\toprule
\rmfamily\emph{name} & \emph{default} & \emph{description}\\\midrule
n & 8 & number of the edges of the polygon\\
a & 1 & the radius of the outer polygon circle\\
meshbases & true & A boolean to mesh the bases with triangles whose one vertex is the
center of the base and the two other two consecutive vertices of the polygon of the base.\\
colored & false & A boolean which will color the antiprism. This is only possible with \texttt{meshbases=true}.
The bases of the triangles allow a coloration by continuity of a triangle of the periphery of the
antiprisme and the corresponding triangle of the base. It is an adaptation of the idea of H.\,B.\,Meyer
for hexagonal antiprism.~\cite{meyer}\\
fan & false & draw the antiprism as a fan.\\
\bottomrule
\end{xltabular}
\section{Examples}
\subsection{The default behaviour}
For \Lkeyword{viewpoint} and \Lkeyword{Decran} see the documentation of \LPack{pst-solides3d}.~\cite{solides3d}
\begin{LTXexample}[width=0.35\linewidth]
\begin{pspicture}(-3,-3)(3,3)
\psset{viewpoint=100 60 30 rtp2xyz,Decran=100}
\psAntiprism
\end{pspicture}
\end{LTXexample}
\clearpage
\subsection{Using the optional arguments}
\begin{LTXexample}[width=0.35\linewidth]
\begin{pspicture}(-3,-3)(3,3)
\psset{viewpoint=100 60 30 rtp2xyz,Decran=100}
\psAntiprism[a=1,n=15,hue=0 1 0.5 1,
linecolor={[rgb]{0 0 0.5}}]
\end{pspicture}
\end{LTXexample}
\begin{LTXexample}[width=0.35\linewidth]
\begin{pspicture}(-3,-3)(3,3)
\psset{viewpoint=100 60 30 rtp2xyz,Decran=75}
\psAntiprism[a=2,n=10,fillcolor=Miel,hollow,incolor=yellow!20,
linecolor={[rgb]{0 0 0.5}},
linewidth=1.5pt,
opacity=0.9]
\end{pspicture}
\end{LTXexample}
\subsection{No lines for the base triangles: option \texttt{meshbases=false}}
In this case, the 2 bases have the numbers 0 and 1 and we can delete them with the optional
argument setting \Lkeyword{rm}\texttt{=0 1}.
\begin{LTXexample}[width=0.35\linewidth]
\begin{pspicture}(-3,-3)(3,3)
\psset{viewpoint=100 60 30 rtp2xyz,Decran=100}
\psAntiprism[a=2,n=8,inouthue=1 0 0.5 1,
meshbases=false,hollow,
opacity=0.8]
\end{pspicture}
\end{LTXexample}
\begin{LTXexample}[width=0.35\linewidth]
\begin{pspicture}(-3,-3)(3,3)
\psset{viewpoint=100 60 30 rtp2xyz,Decran=100}
\psAntiprism[a=2,n=8,inouthue=1 0 0.5 1,
meshbases=false,numfaces=,hollow,
opacity=0.8,rm=0 1,affinage=]
\end{pspicture}
\end{LTXexample}
\begin{LTXexample}[width=0.35\linewidth]
\begin{pspicture}(-3,-3)(3,3)
\psset{viewpoint=100 60 30 rtp2xyz,Decran=100}
\psAntiprism[a=2,n=10,fillcolor=Maroon,
incolor=yellow!20,
linecolor=blue,
meshbases=false,hollow,
opacity=0.8,affinage=all]
\end{pspicture}
\end{LTXexample}
\section{Colored anitpriam}
This behaviour needs the setting \texttt{meshbases=true} and \texttt{colored=true}.
It allows coloring by continuity of a triangle
around the antiprism and the corresponding triangle of the base. The other options didn't changed
its meaning.
\begin{LTXexample}[width=0.35\linewidth]
\begin{pspicture}(-3,-3)(3,3)
\psset{viewpoint=100 90 30 rtp2xyz,Decran=100}
\psset{a=1,r=1}
\psAntiprism[colored,n=17]
\end{pspicture}
\end{LTXexample}
\begin{LTXexample}[width=0.35\linewidth]
\begin{pspicture}(-3,-3)(3,3)
\psset{viewpoint=100 90 -30 rtp2xyz,Decran=100}
\psset{lightsrc=viewpoint}
\psset{a=1,r=1,hollow,opacity=0.8,linecolor=blue}
\psAntiprism[colored,n=17]
\end{pspicture}
\end{LTXexample}
\section{An antiprism as a fan}
With the optional argument \Lkeyword{fan} the antiprism can be drawn like a fan:
\begin{LTXexample}[width=0.5\linewidth]
\begin{pspicture}(-4.5,-2.5)(4.5,2.5)
\psset{viewpoint=200 15 20 rtp2xyz,
Decran=500}
\psAntiprism[fan,a=0.5,n=20,
inouthue=0.1 1,hollow,opacity=0.9]
\end{pspicture}
\end{LTXexample}
\begin{LTXexample}[width=0.55\linewidth]
\begin{pspicture}(-4.5,-3)(4.5,3)
\psset{viewpoint=100 20 30 rtp2xyz,
Decran=150}
\psAntiprism[fan,n=12,a=1.5,hollow,
incolor=yellow,fillcolor=red,
linecolor=blue,opacity=0.95,
affinage=all,affinagecoeff=0.9]
\end{pspicture}
\end{LTXexample}
\begin{LTXexample}[width=0.55\linewidth]
\begin{pspicture}(-4.5,-3)(4.5,3)
\psset{viewpoint=200 2 25 rtp2xyz,
Decran=500,solidmemory}
\psAntiprism[fan,n=20,a=0.5,hollow,
inouthue=0.1 1,opacity=0.9,
plansepare={[1 0 0 0.05]},
name=eventail,action=none]
\psSolid[object=load,load=eventail1,
deactivatecolor,hollow,opacity=0.8]
\end{pspicture}
\end{LTXexample}
\subsection{animation}
With the package \LPack{animate} one can create inline animations in an easy way:
\begin{center}
\begin{animateinline}[controls,loop,
begin={\begin{pspicture}(-4.5,-2.5)(4.5,2.5)},
end={\end{pspicture}}]{12}% 25 images/s
\multiframe{72}{iTheta=0+5}{%
\psset{viewpoint=200 \iTheta\space 20 rtp2xyz,
Decran=500}
\psAntiprism[fan,a=0.5,n=20,inouthue=0.1 1,hollow,opacity=0.9]}
\end{animateinline}
\end{center}
\begin{lstlisting}
\begin{animateinline}[controls,loop,
begin={\begin{pspicture}(-4.5,-2.5)(4.5,2.5)},
end={\end{pspicture}}]{12}% 25 images/s
\multiframe{72}{iTheta=0+5}{%
\psset{viewpoint=200 \iTheta\space 20 rtp2xyz,
Decran=500}
\psAntiprism[fan,a=0.5,n=20,inouthue=0.1 1,hollow,opacity=0.9]}
\end{animateinline}
\end{lstlisting}
\begin{center}
\begin{animateinline}[controls,loop,
begin={\begin{pspicture}(-4,-4)(4,4)},
end={\end{pspicture}}]{12}% 25 images/s
\multiframe{72}{iTheta=0+5}{%
\psset{viewpoint=100 90 20 rtp2xyz,Decran=120}
\psset{lightsrc=viewpoint}
\psset{a=1,r=1,hollow,opacity=0.8,linecolor=blue,RotSequence=zxy,RotX=\iTheta,RotZ=\iTheta}
\psAntiprism[colored,n=17]}
\end{animateinline}
\end{center}
\begin{lstlisting}
\begin{animateinline}[controls,loop,
begin={\begin{pspicture}(-4,-4)(4,4)},
end={\end{pspicture}}]{12}% 25 images/s
\multiframe{72}{iTheta=0+5}{%
\psset{viewpoint=100 90 20 rtp2xyz,Decran=120}
\psset{lightsrc=viewpoint}
\psset{a=1,r=1,hollow,opacity=0.8,linecolor=blue,RotSequence=zxy,RotX=\iTheta,RotZ=\iTheta}
\psAntiprism[colored,n=17]}
\end{animateinline}
\end{lstlisting}
\clearpage
\section{List of all optional arguments for \texttt{pst-antiprism}}
\xkvview{family=pst-antiprism,columns={key,type,default}}
\bgroup
\raggedright
\nocite{*}
\printbibliography
\egroup
\printindex
\end{document}
|