0% found this document useful (0 votes)
42 views8 pages

PST Light3d

The pst-light3d package version 0.11 provides macros for adding three-dimensional lighting effects to characters and PSTricks graphics. It allows lighting of text using PstLightThreeDText and curves using PstLightThreeDGraphic, with customization parameters. The document includes examples of using these macros on text in various fonts and orientations, as well as on curves, polygons, and parametric plots, demonstrating control of lighting position and color.

Uploaded by

o0obavuongo0o
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views8 pages

PST Light3d

The pst-light3d package version 0.11 provides macros for adding three-dimensional lighting effects to characters and PSTricks graphics. It allows lighting of text using PstLightThreeDText and curves using PstLightThreeDGraphic, with customization parameters. The document includes examples of using these macros on text in various fonts and orientations, as well as on curves, polygons, and parametric plots, demonstrating control of lighting position and color.

Uploaded by

o0obavuongo0o
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

The pst-light3d package

version 0.11
A PSTricks package for three dimensional
lighten eect on characters and PSTricks
graphics

Denis Girou and Peter Kleiweg


August 13, 2007
Abstract
This package allow to add a three dimensional lighten eect on
characters (PostScript fonts), using the PstLightThreeDText macro,
and curves (opened or closed), using the PstLightThreeDGraphic
macro, with various customization parameters.

Documentation revised by Herbert Vo


1
1 Examples
1 \DeclareFixedFont{\Bf}{T1}{ptm}{b}{n}{3
cm}
2 \PstLightThreeDText[fillstyle=solid,
fillcolor=white]{\Bf Test}
1 \DeclareFixedFont{\Bf}{T1}{ptm}{b}{n}{3
cm}
2 \PstLightThreeDText[linestyle=none,
fillstyle=solid, fillcolor=darkgray]{\
Bf Test}
1 \psset{linestyle=none,fillstyle=solid,
fillcolor=LightGreen}%
2 \PstLightThreeDText[LightThreeDAngle
=0]{\Bf Test}\\[0.5cm]
3 \PstLightThreeDText[LightThreeDAngle
=90]{\Bf Test}
1 \psset{linestyle=none,fillstyle=solid,
fillcolor=magenta,}%
2 \PstLightThreeDText[LightThreeDXLength
=0.5, LightThreeDYLength=-1]{\Bf Test
}\\[1cm]
3 \PstLightThreeDText[LightThreeDXLength
=-1, LightThreeDYLength=0.5]{\Bf Test}
2
1 \DeclareFixedFont{\Sf}{T1}{phv}{b}{n}{3
cm}
2 \psset{linestyle=none,fillstyle=solid,
fillcolor=cyan}%
3 \PstLightThreeDText[
LightThreeDColorPsCommand=1.2 div
setgray]{\Sf 123}\\[1cm]
4 \PstLightThreeDText[
LightThreeDColorPsCommand=2.5 div
setgray]{\Sf 123}
1 \DeclareFixedFont{\Rm}{T1}{ptm}{m}{n}{3
cm}
2 \psset{linestyle=none,fillstyle=solid}%
3 \PstLightThreeDText[fillcolor=Violet,
LightThreeDColorPsCommand=%
4 2.5 div 0.7 exch 0.8 sethsbcolor]{\Rm
987}\\[1cm]
5 \PstLightThreeDText[fillcolor=DarkGreen,
LightThreeDColorPsCommand=%
6 2 div 0.5 exch 0.2 exch sethsbcolor]{\
Rm 987}
1 \DeclareFixedFont{\Rmb}{T1}{ptm}{m}{n}{4cm}
2 \PstLightThreeDText[linestyle=none,fillstyle=solid,fillcolor=Gold,
LightThreeDColorPsCommand=%
3 1.2 div 0.15 exch 0.7 exch sethsbcolor]{\Rmb PSTricks}
1 \psset{unit=0.5cm,linestyle=solid,fillstyle=none
}%
2 \pspicture(-0.1,-3.5)(7.2,3)
3 \PstLightThreeDGraphic[LightThreeDXLength=0.4,
LightThreeDColorPsCommand=%
4 1.2 div 0.15 exch 0.7 exch sethsbcolor]{%
5 \pscurve(0,2)(1,-3)(2,2)(4,3)(7,0)}
6 \endpspicture
3
1 \psset{unit=0.5cm,linestyle=solid,fillstyle=none
}%
2 \pspicture(0,-3.5)(7.7,3)
3 \PstLightThreeDGraphic[LightThreeDXLength=0.8,
LightThreeDColorPsCommand=%
4 2 div 0.35 exch 0.9 exch sethsbcolor]{\
pspolygon(0,2)(1,-3)(2,0)(4,1)(6,1)(7,3)}
5 \endpspicture
1 \psset{unit=0.5cm,linestyle=solid,fillstyle=none
}%
2 \pspicture(0.5,-3.6)(3.8,3)
3 \PstLightThreeDGraphic[LightThreeDColorPsCommand
=%
4 2.6 div 0.12 exch 0.7 exch sethsbcolor]{\
psellipse(2,0)(1.5,3)}
5 \endpspicture
1 \SpecialCoor
2 \def\PstCoordinates{}%
3 \Multido{\nDistance=0.00+0.02,\iAngle
=0+20}{200}{%
4 \edef\PstCoordinates{\PstCoordinates(\
nDistance;\iAngle)}}
5 \psset{unit=0.5cm}%
6 \pspicture(-3.8,-4)(4.1,3.7)
7 \PstLightThreeDGraphic[LightThreeDLength=0.2,
LightThreeDColorPsCommand=%
8 1.2 div 0.3 exch 0.7 exch sethsbcolor]{\
expandafter\pscurve\PstCoordinates}
9 \endpspicture
1 \SpecialCoor
2 \def\PstCoordinates{}%
3 \Multido{\nDistance=0.00+0.02,\iAngle
=0+20}{200}{%
4 \edef\PstCoordinates{\PstCoordinates(\
nDistance;\iAngle)}}
5 \psset{unit=0.5cm}%
6 \pspicture(-3.8,-4)(4.1,3.7)
7 \PstLightThreeDGraphic[LightThreeDLength=0.2,
LightThreeDAngle=30,LightThreeDColorPsCommand=
%
8 /Counter Counter 0.00005 add def 2 mul Counter
exch 0.7 exch sethsbcolor]{%
9 \pstVerb{ /Counter 0 def }%
10 \expandafter\pscurve\PstCoordinates}
11 \endpspicture
4
Jane
Marc
Bob Ann Peter
1 \PstLightThreeDGraphic[LightThreeDXLength=0.2,
2 LightThreeDYLength=-0.2,
3 LightThreeDColorPsCommand=
4 1.2 div 0.65 exch 0.9 sethsbcolor]{%
5 \large \let\TovalORIG\Toval \def\Toval#1{\TovalORIG{\raise2mm\hbox{\
hskip2mm#1}}}%
6 \let\TtriORIG\Ttri \def\Ttri#1{\TtriORIG{\raise3mm\hbox{#1}}}%
7 \psset{framesep=0.15,fillstyle=gradient,gradmidpoint=0, gradbegin=
cyan,gradend=blue}%
8 \pstree[treesep=0.5]{\Ttri{Jane}} {\psset{framesep=0.25}%
9 \pstree{\Toval{Marc}} {\Toval{Bob}\Toval{Ann}\Toval{Peter}}}}
5
0 0.2 0.4 0.6 0.8 1.0
1.2
1.0
0.8
0.6
0.4
0.2
0.0
0.2
0.4
0.6
0.8
1.0
1.2
sin(10 x)
cos(40 x)/2
x
1 \psset{xunit=8cm,yunit=3cm}%
2 \pspicture(-0.45,-1.6)(1,1.3)%
3 \psaxes[Dx=0.2,Oy=-1.2,Dy=0.2,tickstyle=top, axesstyle=frame](0,-1.2)
(1,1.2)%
4 \psset{plotpoints=500,LightThreeDXLength=0.3, LightThreeDYLength=-0.3}%
5 \PstLightThreeDGraphic[LightThreeDColorPsCommand=1.5 div 0.05 exch 0.8
sethsbcolor]{%
6 \psplot{0}{0.95}{x 10 mul 57.296 mul sin}}%
7 \PstLightThreeDGraphic[LightThreeDColorPsCommand=1.5 div 0.6 exch 0.8
sethsbcolor]{%
8 \psplot{0}{0.95}{x 40 mul 57.296 mul cos 2 div}}%
9 \rput(-0.3,0.1){\textcolor{red}{$\sin (10 \times x)$}}%
10 \rput(-0.3,-0.1){\textcolor{blue}{$\cos (40 \times x) / 2$}}%
11 \rput(0.5,-1.5){$x$}%
12 \endpspicture
References
[1] Hendri Adriaens. The xkeyval - package.
CTAN:/macros/latex/contrib/xkeyval/, 2006.
[2] D. P. Carlisle and S. P. Q. Rahtz. The keyval - package.
CTAN:/macros/latex/required/graphics/keyval.dtx, 2001.
[3] Denis Girou. Prsentation de PSTricks. Cahier GUTenberg, 16:2170,
April 1994.
6
[4] Michel Goosens, Frank Mittelbach, Sebastian Rahtz, Denis Roegel,
and Herbert Vo. The L
A
T
E
X Graphics Companion. Addison-Wesley
Publishing Company, Reading, Mass., 2007.
[5] Laura E. Jackson and Herbert Vo. Die plot-funktionen von pst-plot.
Die T
E
Xnische Komdie, 2/02:2734, June 2002.
[6] Nikolai G. Kollock. PostScript richtig eingesetzt: vom Konzept zum
praktischen Einsatz. IWT, Vaterstetten, 1989.
[7] Rolf Niepraschk and Herbert Vo. PSTricks - mehr als nur ein alter
Hut. DANTE 2004 in Darmstadt,
http://PSTricks.de/docs/Darmstadt2004.pdf, 2004.
[8] Sebastian Rahtz. An introduction to PSTricks, part I. Baskerville,
6(1):2234, February 1996.
[9] Sebastian Rahtz. An introduction to PSTricks, part II. Baskerville,
6(2):2333, April 1996.
[10] Timothy Van Zandt. PSTricks - PostScript macros for Generic T
E
X,
Documented Code.
CTAN:/graphics/pstricks/obsolete/doc/src/pst-code.tex, 1997.
[11] Herbert Vo. Three dimensional plots with pst-3dplot. TUGboat,
22-4:319, December 2001.
[12] Herbert Vo. PSTricks Grak fr T
E
X und L
A
T
E
X. DANTE
Lehmanns, Heidelberg/Hamburg, forth edition, 2007.
[13] Herbert Vo. The pstricks-add - package.
CTAN:/graphics/pstricks/contrib/pstricks-add/, 2007.
[14] Herbert Vo and Jana Vo. The plot functions of pst-plot. TUGboat,
22-4:314318, December 2001.
[15] Michael Wiedmann. References for T
E
X and Friends.
http://www.miwie.org/tex-refs/, 2004.
[16] Timothy van Zandt. pst-eps: Exporting eps images.
CTAN:graphics/pstricks/generic/, 2003.
[17] Timothy van Zandt. multido.tex - a loop macro, that supports
xed-point addition.
CTAN:/graphics/pstricks/generic/multido.tex, 2004.
7
[18] Timothy Van Zandt. The pst-plot - package.
CTAN:/graphics/pstricks/generic/, 2004.
[19] Timothy van Zandt. PSTricks - PostScript macros for generic T
E
X.
http://www.tug.org/application/PSTricks, 2006.
[20] Timothy van Zandt and Denis Girou. Inside PSTricks. TUGboat,
15:239246, September 1994.
8

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy