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
|
\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{lmodern}
\usepackage{fancyvrb}
\usepackage{multido}
\usepackage{pstricks}
\usepackage{pst-grad}
\usepackage{pst-light3d}
\let\pstlightVersion\FileVersion
%
\usepackage{pst-plot}
\usepackage{pst-tree}
\usepackage{showexpl,xspace}
\def\PST{{\texttt{PSTricks}}\xspace}
\def\PDF{{\texttt{PDF}}\xspace}
\def\pst{{\texttt{pstricks}}\xspace}
\def\PS{PostScript\xspace}
\newcommand*\CMD[1]{{\UrlFont\texttt{\textbackslash #1}}}
\usepackage{url}
\def\PstLightThreeDPackage{\texttt{pst-light3d}}
\definecolor{DarkGreen}{cmyk}{1,0,1,0.8}
\definecolor{LightGreen}{cmyk}{1,0,1,0.2}
\definecolor{Gold}{rgb}{1,0.84,0}
\definecolor{Violet}{cmyk}{0.79,0.88,0,0}
\hbadness=7000 % Over and under full box warnings
\hfuzz=3pt
\errorcontextlines100
\newenvironment{optlist}{\begin{description}%
\renewcommand\makelabel[1]{%
\descriptionlabel{\mdseries\textsf{##1}}}%
\itemsep0.25\itemsep}%
{\end{description}}
%
\def\cs#1{\texttt{#1}}
\title{The \PstLightThreeDPackage{} package\\
{\footnotesize version \pstlightVersion}\\
A PSTricks package for three dimensional\\
lighten effect on characters and PSTricks graphics\thanks{%
Documentation revised by Herbert Voß}}
\author{Denis \textsc{Girou}
and Peter \textsc{Kleiweg} }
\date{\today}
\begin{document}
%
\maketitle
%
\begin{abstract}
This package allow to add a three dimensional lighten
effect on characters (PostScript fonts), using the
\cs{PstLightThreeDText} macro, and curves (opened or closed),
using the \cs{PstLightThreeDGraphic} macro, with various customization parameters.
\end{abstract}
%
%\tableofcontents
\clearpage
\section{Examples}
\begin{LTXexample}[width=5.5cm]
\DeclareFixedFont{\Bf}{T1}{ptm}{b}{n}{3cm}
\PstLightThreeDText[fillstyle=solid,fillcolor=white]{\Bf Test}
\end{LTXexample}
\begin{LTXexample}[width=5.5cm]
\DeclareFixedFont{\Bf}{T1}{ptm}{b}{n}{3cm}
\PstLightThreeDText[linestyle=none,fillstyle=solid, fillcolor=darkgray]{\Bf Test}
\end{LTXexample}
\begin{LTXexample}[width=5.5cm]
\psset{linestyle=none,fillstyle=solid,fillcolor=LightGreen}%
\PstLightThreeDText[LightThreeDAngle=0]{\Bf Test}\\[0.5cm]
\PstLightThreeDText[LightThreeDAngle=90]{\Bf Test}
\end{LTXexample}
\begin{LTXexample}[width=5.5cm]
\psset{linestyle=none,fillstyle=solid,fillcolor=magenta,}%
\PstLightThreeDText[LightThreeDXLength=0.5, LightThreeDYLength=-1]{\Bf Test}\\[1cm]
\PstLightThreeDText[LightThreeDXLength=-1, LightThreeDYLength=0.5]{\Bf Test}
\end{LTXexample}
\begin{LTXexample}[width=5.5cm]
\DeclareFixedFont{\Sf}{T1}{phv}{b}{n}{3cm}
\psset{linestyle=none,fillstyle=solid,fillcolor=cyan}%
\PstLightThreeDText[LightThreeDColorPsCommand=1.2 div setgray]{\Sf 123}\\[1cm]
\PstLightThreeDText[LightThreeDColorPsCommand=2.5 div setgray]{\Sf 123}
\end{LTXexample}
\begin{LTXexample}[width=5.5cm]
\DeclareFixedFont{\Rm}{T1}{ptm}{m}{n}{3cm}
\psset{linestyle=none,fillstyle=solid}%
\PstLightThreeDText[fillcolor=Violet, LightThreeDColorPsCommand=%
2.5 div 0.7 exch 0.8 sethsbcolor]{\Rm 987}\\[1cm]
\PstLightThreeDText[fillcolor=DarkGreen, LightThreeDColorPsCommand=%
2 div 0.5 exch 0.2 exch sethsbcolor]{\Rm 987}
\end{LTXexample}
\begin{LTXexample}[pos=t]
\DeclareFixedFont{\Rmb}{T1}{ptm}{m}{n}{4cm}
\PstLightThreeDText[linestyle=none,fillstyle=solid,fillcolor=Gold, LightThreeDColorPsCommand=%
1.2 div 0.15 exch 0.7 exch sethsbcolor]{\Rmb PSTricks}
\end{LTXexample}
\begin{LTXexample}[width=4cm]
\psset{unit=0.5cm,linestyle=solid,fillstyle=none}%
\pspicture(-0.1,-3.5)(7.2,3)
\PstLightThreeDGraphic[LightThreeDXLength=0.4, LightThreeDColorPsCommand=%
1.2 div 0.15 exch 0.7 exch sethsbcolor]{%
\pscurve(0,2)(1,-3)(2,2)(4,3)(7,0)}
\endpspicture
\end{LTXexample}
\begin{LTXexample}[width=4cm]
\psset{unit=0.5cm,linestyle=solid,fillstyle=none}%
\pspicture(0,-3.5)(7.7,3)
\PstLightThreeDGraphic[LightThreeDXLength=0.8, LightThreeDColorPsCommand=%
2 div 0.35 exch 0.9 exch sethsbcolor]{\pspolygon(0,2)(1,-3)(2,0)(4,1)(6,1)(7,3)}
\endpspicture
\end{LTXexample}
\begin{LTXexample}[width=4cm]
\psset{unit=0.5cm,linestyle=solid,fillstyle=none}%
\pspicture(0.5,-3.6)(3.8,3)
\PstLightThreeDGraphic[LightThreeDColorPsCommand=%
2.6 div 0.12 exch 0.7 exch sethsbcolor]{\psellipse(2,0)(1.5,3)}
\endpspicture
\end{LTXexample}
\begin{LTXexample}[width=4cm]
\SpecialCoor
\def\PstCoordinates{}%
\Multido{\nDistance=0.00+0.02,\iAngle=0+20}{200}{%
\edef\PstCoordinates{\PstCoordinates(\nDistance;\iAngle)}}
\psset{unit=0.5cm}%
\pspicture(-3.8,-4)(4.1,3.7)
\PstLightThreeDGraphic[LightThreeDLength=0.2, LightThreeDColorPsCommand=%
1.2 div 0.3 exch 0.7 exch sethsbcolor]{\expandafter\pscurve\PstCoordinates}
\endpspicture
\end{LTXexample}
\begin{LTXexample}[width=4cm]
\SpecialCoor
\def\PstCoordinates{}%
\Multido{\nDistance=0.00+0.02,\iAngle=0+20}{200}{%
\edef\PstCoordinates{\PstCoordinates(\nDistance;\iAngle)}}
\psset{unit=0.5cm}%
\pspicture(-3.8,-4)(4.1,3.7)
\PstLightThreeDGraphic[LightThreeDLength=0.2, LightThreeDAngle=30,LightThreeDColorPsCommand=%
/Counter Counter 0.00005 add def 2 mul Counter exch 0.7 exch sethsbcolor]{%
\pstVerb{ /Counter 0 def }%
\expandafter\pscurve\PstCoordinates}
\endpspicture
\end{LTXexample}
\begin{LTXexample}[pos=t]
\PstLightThreeDGraphic[LightThreeDXLength=0.2,
LightThreeDYLength=-0.2,
LightThreeDColorPsCommand=
1.2 div 0.65 exch 0.9 sethsbcolor]{%
\large \let\TovalORIG\Toval \def\Toval#1{\TovalORIG{\raise2mm\hbox{\hskip2mm#1}}}%
\let\TtriORIG\Ttri \def\Ttri#1{\TtriORIG{\raise3mm\hbox{#1}}}%
\psset{framesep=0.15,fillstyle=gradient,gradmidpoint=0, gradbegin=cyan,gradend=blue}%
\pstree[treesep=0.5]{\Ttri{Jane}} {\psset{framesep=0.25}%
\pstree{\Toval{Marc}} {\Toval{Bob}\Toval{Ann}\Toval{Peter}}}}
\end{LTXexample}
\begin{LTXexample}[pos=t]
\psset{xunit=8cm,yunit=3cm}%
\pspicture(-0.45,-1.6)(1,1.3)%
\psaxes[Dx=0.2,Oy=-1.2,Dy=0.2,tickstyle=top, axesstyle=frame](0,-1.2)(1,1.2)%
\psset{plotpoints=500,LightThreeDXLength=0.3, LightThreeDYLength=-0.3}%
\PstLightThreeDGraphic[LightThreeDColorPsCommand=1.5 div 0.05 exch 0.8 sethsbcolor]{%
\psplot{0}{0.95}{x 10 mul 57.296 mul sin}}%
\PstLightThreeDGraphic[LightThreeDColorPsCommand=1.5 div 0.6 exch 0.8 sethsbcolor]{%
\psplot{0}{0.95}{x 40 mul 57.296 mul cos 2 div}}%
\rput(-0.3,0.1){\textcolor{red}{$\sin (10 \times x)$}}%
\rput(-0.3,-0.1){\textcolor{blue}{$\cos (40 \times x) / 2$}}%
\rput(0.5,-1.5){$x$}%
\endpspicture
\end{LTXexample}
%
\nocite{*}
\bgroup
\raggedright
\bibliographystyle{plain}
\bibliography{\jobname}
\egroup
\end{document}
|