Debian Codegraph @

texmf-dist/doc/generic/pst-solides3d/text/par-implicitsurface-en.tex

raw
1
2 \section{Implicit defined three dimensional function \textit{F(x,y,z)=0}}
3
4 The command has the following syntax:
5 \begin{verbatim}
6 \psImplicitSurface[options](x0,y0,z0)
7 \end{verbatim}
8
9 The argument \texttt{(x0,y0,z0)} for the image offset is optional and preset with \texttt{(0,0,0)}
10 The options are the same which apply to solids, and these additional ones:
11
12 \begin{itemize}
13 \item \Lkeyword{algebraic}: this option allows you to write the implicit defined function $F(x,y,z)$ in
14 algebraic notation; \texttt{pst-algparser.pro} contains the code \texttt{AlgToPs}.
15
16 \item \Lkeyword{XMinMax}: three values devided by a space: minimum maximum step;
17 \item \Lkeyword{YMinMax}: three values devided by a space: minimum maximum step;
18 \item \Lkeyword{ZMinMax}: three values devided by a space: minimum maximum step;
19 \item \Lkeyword{ImplFunction}: the function $F(x,y,z)=0$ where only $F(x,y,z)$ is written in
20 PostScript notation, or with the optional argument \Lkeyword{algebraic} in
21 algebraic notation.
22 \end{itemize}
23
24 The internal PostScript code of \texttt{pst-implicitsurface.pro} is based on Paul Bourkes "'Polygonising a scalar field"`
25 at \url{http://paulbourke.net/geometry/polygonise/}.
26
27
28
29
30 \iffalse
31 \small
32 \begin{verbatim}
33 \begin{animateinline}[controls,autoplay,loop,
34 begin={\begin{pspicture}(-6,-5)(6,4)},end={\end{pspicture}}]{5}
35 \multiframe{18}{iA=0+20}{%
36 \psset{lightsrc=viewpoint,viewpoint=40 \iA\space 15 rtp2xyz,Decran=50}
37 \psSolid[object=grille,base=-4 4 -4 4,ngrid=8 8,linecolor=black!10](0,0,-2)
38 \psImplicitSurface[
39 XMinMax=-2.0 2.0 0.15,YMinMax=-2.0 2.0 0.15,ZMinMax=-2.0 2.0 0.15,
40 algebraic,
41 ImplFunction=4*x^4+4*y^4+8*y^2*z^2+4*z^4+17*x^2*y^2+17*x^2*z^2-20*x^2-20*y^2-20*z^2+17,
42 fillcolor=cyan!20,hue=.1 .8 0.5 1,
43 linewidth=0.01pt]%
44 }
45 \end{animateinline}
46 \end{verbatim}
47 \normalsize
48
49 \begin{animateinline}[controls,autoplay,loop,
50 begin={\begin{pspicture}(-6,-5)(6,4)},
51 end={\end{pspicture}}]{5}
52 \multiframe{18}{iA=0+20}{%
53 \psset{lightsrc=viewpoint,viewpoint=40 \iA\space 15 rtp2xyz,Decran=50}
54 \psSolid[object=grille,base=-4 4 -4 4,ngrid=8 8,linecolor=black!10](0,0,-2)
55 \psImplicitSurface[
56 XMinMax=-2.0 2.0 0.15,YMinMax=-2.0 2.0 0.15,ZMinMax=-2.0 2.0 0.15,
57 algebraic,
58 ImplFunction=4*x^4+4*y^4+8*y^2*z^2+4*z^4+17*x^2*y^2+17*x^2*z^2-20*x^2-20*y^2-20*z^2+17,
59 fillcolor=cyan!20,hue=.1 .8 0.5 1,
60 linewidth=0.01pt]%
61 }
62 \end{animateinline}
63 \else
64 \begin{LTXexample}[pos=t]
65 \begin{pspicture}(-6,-5)(6,4)
66 \psset{lightsrc=viewpoint,viewpoint=40 80 15 rtp2xyz,Decran=50}
67 \psSolid[object=grille,base=-4 4 -4 4,ngrid=8 8,linecolor=black!10](0,0,-2)
68 \psImplicitSurface[
69 XMinMax=-2.0 2.0 0.15,YMinMax=-2.0 2.0 0.15,ZMinMax=-2.0 2.0 0.15,
70 algebraic,
71 ImplFunction=4*x^4+4*y^4+8*y^2*z^2+4*z^4+17*x^2*y^2+17*x^2*z^2-20*x^2-20*y^2-20*z^2+17,
72 fillcolor=cyan!20,hue=.1 .8 0.5 1,
73 linewidth=0.01pt]%
74 \end{pspicture}
75 \end{LTXexample}
76 \fi
77
78
79 \begin{LTXexample}[pos=t]
80 \begin{pspicture}(-5,-4)(5,4)
81 \psset{lightsrc=viewpoint,viewpoint=50 90 30 rtp2xyz,Decran=50}
82 \psSolid[object=grille,base=-4 4 -4 4,ngrid=8 8,linecolor=black!20](0,0,-1)
83 \psImplicitSurface[%hollow,
84 hue=1 0 0.5 1,
85 XMinMax=-4 4 0.2,YMinMax=-4 4 0.2,ZMinMax=-4 4 0.2,
86 algebraic,
87 ImplFunction=1/((x+0.75)^2+y^2+z^2)+1/((x-0.75)^2+y^2+z^2)-1,
88 fillcolor=cyan!20,linewidth=0.05pt]
89 \end{pspicture}
90 \end{LTXexample}
91
92
93 \begin{LTXexample}[pos=t]
94 \begin{pspicture}(-6,-3)(6,4)
95 \psset{lightsrc=10 20 20 rtp2xyz,viewpoint=100 60 50 rtp2xyz,Decran=150}
96 \pstVerb{
97 /RConst 1 def
98 /rConst 0.25 def
99 /torusImplicit {
100 X dup mul Y dup mul add z dup mul add dup mul
101 -2 RConst dup mul rConst dup mul add mul X dup mul Y dup mul add mul
102 add
103 2 RConst dup mul rConst dup mul sub mul z dup mul mul
104 add
105 RConst dup mul rConst dup mul sub add
106 } def
107 /tripleTorus {
108 0 120 240 {
109 /i exch def
110 /X {x 1.5 i cos mul sub} def
111 /Y {y 1.5 i sin mul sub} def
112 torusImplicit
113 } for
114 mul mul
115 10 sub
116 } def
117 }%
118 \psImplicitSurface[
119 ImplFunction=tripleTorus,linewidth=0.01pt,
120 fillcolor=red!60!green!40,linecolor=black!10,
121 lightintensity=5,
122 XMinMax=-3 3 0.1,YMinMax=-3 3 0.1,ZMinMax=-0.5 0.5 0.1]
123 \end{pspicture}
124 \end{LTXexample}
125
126
127
128 A lot of examples can be found here: \url{http://www-sop.inria.fr/galaad/surface/}. A list of Steiner surfaces
129 at \url{http://www-sop.inria.fr/galaad/surface/steiner/index.html} and a list of surfaces with isolated singularities
130 at \url{http://www-sop.inria.fr/galaad/surface/classification/index.html}.
131
132
133
134
135 \endinput
136
137