0f05d379cf76fb38519de3484d898122c18937b4
[scilab.git] / scilab / modules / graphics / help / pt_BR / 3d_plot / plot3d1.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) ENPC - Jean-Philippe Chancelier
5  * 
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11  *
12  -->
13 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="plot3d1" xml:lang="en">
14     <refnamediv>
15         <refname>plot3d1</refname>
16         <refpurpose>Esboço 3d em níveis de cinza ou de cores de uma
17             superfície
18         </refpurpose>
19     </refnamediv>
20     <refsynopsisdiv>
21         <title>Seqüência de Chamamento</title>
22         <synopsis>plot3d1(x,y,z,[theta,alpha,leg,flag,ebox])
23             plot3d1(xf,yf,zf,[theta,alpha,leg,flag,ebox])
24             
25             plot3d1(x,y,z,&lt;opts_args&gt;)
26             plot3d1(xf,yf,zf,&lt;opts_args&gt;)
27         </synopsis>
28     </refsynopsisdiv>
29     <refsection>
30         <title>Parâmetros</title>
31         <variablelist>
32             <varlistentry>
33                 <term>x,y</term>
34                 <listitem>
35                     <para>vetores linhas de tamanhos n1 e n2 (coordenadas dos eixos x e
36                         y). Estas coordenadas devem ser monótonas. 
37                     </para>
38                 </listitem>
39             </varlistentry>
40             <varlistentry>
41                 <term>z</term>
42                 <listitem>
43                     <para>
44                         matriz de tamanho (n1,n2). <literal>z(i,j)</literal> é o valor
45                         da superfície no ponto (x(i),y(j)).
46                     </para>
47                 </listitem>
48             </varlistentry>
49             <varlistentry>
50                 <term>xf,yf,zf</term>
51                 <listitem>
52                     <para>matrizes de tamanho (nf,n). Elas definem as facetas usadas
53                         para desenhar a superfície. Há <literal>n</literal> facetas. Cada
54                         faceta <literal>i</literal> é definida por um polígono com
55                         <literal>nf</literal> pontos. As coordenadas dos eixos x, y e z dos
56                         pontos da i-ésima faceta são dados respectivamente por
57                         <literal>xf(:,i)</literal>, <literal>yf(:,i)</literal> e
58                         <literal>zf(:,i)</literal>.
59                     </para>
60                 </listitem>
61             </varlistentry>
62             <varlistentry>
63                 <term>&lt;opt_args&gt;</term>
64                 <listitem>
65                     <para>
66                         representa uma seqüência de declarações <literal>key1=value1,
67                             key2=value2
68                         </literal>
69                         ,... onde <literal>key1</literal>,
70                         <literal>key2,...</literal> pode ser um dos seguintes: theta, alpha
71                         , leg, flag, ebox (ver definições abaixo). 
72                     </para>
73                 </listitem>
74             </varlistentry>
75             <varlistentry>
76                 <term>theta, alpha</term>
77                 <listitem>
78                     <para>valores reais de dados em graus, as coordenadas esféricas do
79                         ponto de observação. 
80                     </para>
81                 </listitem>
82             </varlistentry>
83             <varlistentry>
84                 <term>leg</term>
85                 <listitem>
86                     <para>string definindo os rótulos para cada eixo com @ como um
87                         separador de campos, por exemplo "X@Y@Z". 
88                     </para>
89                 </listitem>
90             </varlistentry>
91             <varlistentry>
92                 <term>flag</term>
93                 <listitem>
94                     <para>um vetor real de tamanho três.
95                         <literal>flag=[mode,type,box]</literal>.
96                     </para>
97                     <variablelist>
98                         <varlistentry>
99                             <term>mode</term>
100                             <listitem>
101                                 <para>um inteiro (cor da superfície).</para>
102                                 <variablelist>
103                                     <varlistentry>
104                                         <term>mode&gt;0</term>
105                                         <listitem>
106                                             <para>a superfície é pintada com a cor
107                                                 <literal>"mode"</literal> ; a borda da faceta é
108                                                 desenhada com o estilo e linha e cor correntes. 
109                                             </para>
110                                         </listitem>
111                                     </varlistentry>
112                                     <varlistentry>
113                                         <term>mode=0:</term>
114                                         <listitem>
115                                             <para>uma malha da superfície é desenhada. </para>
116                                         </listitem>
117                                     </varlistentry>
118                                     <varlistentry>
119                                         <term>mode&lt;0:</term>
120                                         <listitem>
121                                             <para> a superfície é pintada com a cor
122                                                 <literal>"-mode"</literal> ; a borda da faceta não é
123                                                 desenhada.
124                                             </para>
125                                             <para>Note que o tratamento de cor da superfície pode
126                                                 ser feito utilizando-se as opções
127                                                 <literal>color_mode</literal> e
128                                                 <literal>color_flag</literal> através das propriedades
129                                                 da entidade Surface (ver <link linkend="surface_properties">surface_properties</link>).
130                                             </para>
131                                         </listitem>
132                                     </varlistentry>
133                                 </variablelist>
134                             </listitem>
135                         </varlistentry>
136                         <varlistentry>
137                             <term>type</term>
138                             <listitem>
139                                 <para>um inteiro (tipo de escala).</para>
140                                 <variablelist>
141                                     <varlistentry>
142                                         <term>type=0:</term>
143                                         <listitem>
144                                             <para>o esboço é feito utilizando-se a escala 3d
145                                                 corrente (definida por uma chamada anterior a
146                                                 <literal>param3d</literal>, <literal>plot3d</literal>,
147                                                 <literal>contour</literal> ou
148                                                 <literal>plot3d1</literal>).
149                                             </para>
150                                         </listitem>
151                                     </varlistentry>
152                                     <varlistentry>
153                                         <term>type=1:</term>
154                                         <listitem>
155                                             <para>re-escala automaticamente caixas 3d com relação de
156                                                 aspecto extrema, as fronteiras são especificadas pelo
157                                                 valor do argumento opcional
158                                                 <literal>ebox</literal>.
159                                             </para>
160                                         </listitem>
161                                     </varlistentry>
162                                     <varlistentry>
163                                         <term>type=2:</term>
164                                         <listitem>
165                                             <para>re-escala automaticamente caixas 3d com relação de
166                                                 aspecto extrema, as fronteiras são computadas
167                                                 utilizando-se dados fornecidos. 
168                                             </para>
169                                         </listitem>
170                                     </varlistentry>
171                                     <varlistentry>
172                                         <term>type=3:</term>
173                                         <listitem>
174                                             <para>fronteiras 3d isométricas com fronteiras da caixa
175                                                 dadas por <literal>ebox</literal>, de modo semelhante a
176                                                 <literal>type=1</literal>.
177                                             </para>
178                                         </listitem>
179                                     </varlistentry>
180                                     <varlistentry>
181                                         <term>type=4:</term>
182                                         <listitem>
183                                             <para>fronteiras 3d isométricas derivadas dos dados, de
184                                                 modo semelhante a <literal>type=2</literal>.
185                                             </para>
186                                         </listitem>
187                                     </varlistentry>
188                                     <varlistentry>
189                                         <term>type=5:</term>
190                                         <listitem>
191                                             <para>fronteiras 3d isométricas expandidas com
192                                                 fronteiras fornecidas por <literal>ebox</literal>, de
193                                                 modo semelhante a <literal>type=1</literal>.
194                                             </para>
195                                         </listitem>
196                                     </varlistentry>
197                                     <varlistentry>
198                                         <term>type=6:</term>
199                                         <listitem>
200                                             <para> fronteiras 3d isométricas expandidas derivadas
201                                                 dos dados, de modo semelhante a
202                                                 <literal>type=2</literal>.
203                                             </para>
204                                             <para>Note que as fronteiras dos eixos podem ser
205                                                 customizadas através das propriedades da entidade Axes
206                                                 (ver <link linkend="axes_properties">axes_properties</link>).
207                                             </para>
208                                         </listitem>
209                                     </varlistentry>
210                                 </variablelist>
211                             </listitem>
212                         </varlistentry>
213                         <varlistentry>
214                             <term>box</term>
215                             <listitem>
216                                 <para>um inteiro (moldura ao redor do esboço).</para>
217                                 <variablelist>
218                                     <varlistentry>
219                                         <term>box=0:</term>
220                                         <listitem>
221                                             <para>nada é desenhado ao redor do esboço. </para>
222                                         </listitem>
223                                     </varlistentry>
224                                     <varlistentry>
225                                         <term>box=1:</term>
226                                         <listitem>
227                                             <para>não implementado (é como box=0). </para>
228                                         </listitem>
229                                     </varlistentry>
230                                     <varlistentry>
231                                         <term>box=2:</term>
232                                         <listitem>
233                                             <para>apenas os eixos atrás da superfície são
234                                                 desenhados.
235                                             </para>
236                                         </listitem>
237                                     </varlistentry>
238                                     <varlistentry>
239                                         <term>box=3:</term>
240                                         <listitem>
241                                             <para>uma caixa cercando a superfície é desenhada e
242                                                 legendas são adicionadas.
243                                             </para>
244                                         </listitem>
245                                     </varlistentry>
246                                     <varlistentry>
247                                         <term>box=4:</term>
248                                         <listitem>
249                                             <para>uma caixa cercando a superfície é desenhada e
250                                                 legendas e eixos são adicionados.
251                                             </para>
252                                             <para>Note que o aspecto dos eixos pode ser customizado
253                                                 através das propriedades da entidade Axes (ver <link linkend="axes_properties">axes_properties</link>).
254                                             </para>
255                                         </listitem>
256                                     </varlistentry>
257                                 </variablelist>
258                             </listitem>
259                         </varlistentry>
260                     </variablelist>
261                 </listitem>
262             </varlistentry>
263             <varlistentry>
264                 <term>ebox</term>
265                 <listitem>
266                     <para>especifica as fronteiras do esboço através do vetor
267                         <literal>[xmin,xmax,ymin,ymax,zmin,zmax]</literal>. Este argumento é
268                         utilizado junto com <literal>type</literal> em
269                         <literal>flag</literal> : é ajustado para <literal>1</literal>,
270                         <literal>3</literal> ou <literal>5</literal> (volte acima para ver o
271                         comportamento correspondente). Se <literal>flag</literal> estiver
272                         faltando, <literal>ebox</literal> não é levado em conta.
273                     </para>
274                     <para>Note que, quando especificado, o argumento
275                         <literal>ebox</literal> age no campo <literal>data_bounds</literal>
276                         que também pode ser ajustado através das propriedades da entidade de
277                         eixos (ver <link linkend="axes_properties">axes_properties</link>).
278                     </para>
279                 </listitem>
280             </varlistentry>
281         </variablelist>
282     </refsection>
283     <refsection>
284         <title>Descrição</title>
285         <para>
286             <literal>plot3d1</literal> esboça uma superfície com cores
287             dependendo do nível z da superfície. Esta função de esboço especial também
288             pode ser habilitada ajustando <literal>color_flag=1</literal> após um
289             <literal>plot3d</literal> (ver <link linkend="surface_properties">surface_properties</link>)
290         </para>
291         <para>
292             Entre com o comando <literal>plot3d1()</literal> para visualizar uma
293             demonstração.
294         </para>
295     </refsection>
296     <refsection>
297         <title>Exemplos</title>
298         <programlisting role="example"><![CDATA[ 
299 // esboço simples utilizando z=f(x,y) 
300 t=[0:0.3:2*%pi]'; z=sin(t)*cos(t'); 
301 plot3d1(t,t,z) 
302 // mesmo esboço utilizando facetas computadas por genfac3d 
303 [xx,yy,zz]=genfac3d(t,t,z); 
304 clf(); 
305 plot3d1(xx,yy,zz) 
306 // esboços múltiplos 
307 clf(); 
308 plot3d1([xx xx],[yy yy],[zz 4+zz]) 
309 // esboço simples com ponto de vista e legendas 
310 clf() ;
311 plot3d1(1:10,1:20,10*rand(10,20),35,45,"X@Y@Z",[2,2,3]) 
312 // mesmo esboço sem grid
313 clf() 
314 plot3d1(1:10,1:20,10*rand(10,20),35,45,"X@Y@Z",[-2,2,3]) 
315 // esboço de uma esfera utilizando facetas computadas por eval3dp 
316 deff("[x,y,z]=sph(alp,tet)",["x=r*cos(alp).*cos(tet)+orig(1)*ones(tet)";.. 
317 "y=r*cos(alp).*sin(tet)+orig(2)*ones(tet)";.. 
318 "z=r*sin(alp)+orig(3)*ones(tet)"]); 
319 r=1; orig=[0 0 0]; 
320 [xx,yy,zz]=eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,20)); 
321 clf() 
322
323 plot3d(xx,yy,zz)
324 e=gce();
325 e.color_flag=1;
326 scf(2);
327 plot3d1(xx,yy,zz) // os dois gráficos são similares
328  ]]></programlisting>
329     </refsection>
330     <refsection role="see also">
331         <title>Ver Também</title>
332         <simplelist type="inline">
333             <member>
334                 <link linkend="plot3d">plot3d</link>
335             </member>
336             <member>
337                 <link linkend="gca">gca</link>
338             </member>
339             <member>
340                 <link linkend="gce">gce</link>
341             </member>
342             <member>
343                 <link linkend="scf">scf</link>
344             </member>
345             <member>
346                 <link linkend="clf">clf</link>
347             </member>
348         </simplelist>
349     </refsection>
350 </refentry>