Help: Fixed warnings during help generation
[scilab.git] / scilab / modules / graphics / help / pt_BR / polygon / xfpolys.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  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="xfpolys" xml:lang="pt">
17     <refnamediv>
18         <refname>xfpolys</refname>
19         <refpurpose>preenche um conjunto de polígonos</refpurpose>
20     </refnamediv>
21     <refsynopsisdiv>
22         <title>Seqüência de Chamamento</title>
23         <synopsis>xfpolys(xpols,ypols,[fill])</synopsis>
24     </refsynopsisdiv>
25     <refsection>
26         <title>Parâmetros</title>
27         <variablelist>
28             <varlistentry>
29                 <term>xpols,ypols</term>
30                 <listitem>
31                     <para>matrizes de mesmo tamanho (p,n) (pontos dos polígonos).
32                     </para>
33                 </listitem>
34             </varlistentry>
35             <varlistentry>
36                 <term>fill</term>
37                 <listitem>
38                     <para>vetor de tamanho n ou tamanho (p,n)</para>
39                 </listitem>
40             </varlistentry>
41         </variablelist>
42     </refsection>
43     <refsection>
44         <title>Descrição</title>
45         <para>
46             <literal>xfpolys</literal> preenche um conjunto de polígonos de
47             mesmo tamanho definidos pelas matrizes <literal>xpols</literal> e
48             <literal>ypols</literal>. As coordenadas de cada polígono são armazenadas
49             em uma coluna de <literal>xpols</literal> e
50             <literal>ypols</literal>.
51         </para>
52         <para>Os polígonos podem ser preenchidos por uma dada cor (preenchimento
53             monótono) ou pintados com cores interpoladas (preenchimento por
54             graduação). 
55         </para>
56         <variablelist>
57             <varlistentry>
58                 <term>preenchimento monótono</term>
59                 <listitem>
60                     <para>
61                         Neste caso, <literal>fill</literal> deve ser um vetor de
62                         tamanho <literal>n</literal>. O padrão para preenchimento de um
63                         polígono de número i é dado por <literal>fill(i)</literal>:
64                     </para>
65                     <itemizedlist>
66                         <listitem>
67                             <para>
68                                 se <literal>fill(i)&lt;0</literal>, o polígono é
69                                 preenchido com padrão de identificador
70                                 <literal>-fill(i)</literal>.
71                             </para>
72                         </listitem>
73                         <listitem>
74                             <para>
75                                 se <literal>fill(i)=0</literal>, o polígono é desenhado no
76                                 estilo de traço (ou cor) corrente e não é preenchido. 
77                             </para>
78                         </listitem>
79                         <listitem>
80                             <para>
81                                 se <literal>fill(i)&gt;0</literal>, o polígono é
82                                 preenchido com padrão de identificador
83                                 <literal>fill(i)</literal>. Então seu contorno é desenhado com o
84                                 estilo de traço (ou cor) corrente e fechado, se
85                                 necessário.
86                             </para>
87                         </listitem>
88                     </itemizedlist>
89                 </listitem>
90             </varlistentry>
91             <varlistentry>
92                 <term>preenchimento interpolado</term>
93                 <listitem>
94                     <para>
95                         Neste caso, <literal>fill</literal> deve ser uma matriz com o
96                         mesmo mesmo tamanho de <literal>xpols</literal> e
97                         <literal>ypols</literal>. Note que <literal>p</literal> deve ser
98                         igual a 3 ou 4. 
99                     </para>
100                     <para>
101                         <literal>fill(k,i)</literal> fornece a cor da
102                         <literal>k</literal> -ésima borda do polígono
103                         <literal>i</literal>.
104                     </para>
105                 </listitem>
106             </varlistentry>
107         </variablelist>
108     </refsection>
109     <refsection>
110         <title>Exemplos</title>
111         <programlisting role="example"><![CDATA[
112 a=gca();
113 a.data_bounds=[0,-10;210,40];
114 a.foreground=color('red');
115 x1=[0,10,20,30,20,10,0]';
116 y1=[15,30,30,15,0,0,15]';
117 xpols=[x1 x1 x1 x1];
118 xpols=xpols+[0,60,120,180].*.ones(x1);
119 ypols=[y1 y1 y1 y1];
120 xfpolys(xpols,ypols,[-1,0,1,2])
121  ]]></programlisting>
122         <scilab:image>
123             a=gca();
124             a.data_bounds=[0,-10;210,40];
125             a.foreground=color('red');
126             x1=[0,10,20,30,20,10,0]';
127             y1=[15,30,30,15,0,0,15]';
128             xpols=[x1 x1 x1 x1];
129             xpols=xpols+[0,60,120,180].*.ones(x1);
130             ypols=[y1 y1 y1 y1];
131             xfpolys(xpols,ypols,[-1,0,1,2])
132         </scilab:image>
133         
134         <programlisting role="example"><![CDATA[
135 // cores interpoladas
136 clf()
137 f=gcf();
138 a=gca();
139 a.data_bounds=[0,-10;40,30];
140 isoview();
141 x1=[0,10,20,10]';
142 y1=[10,0,10,20]';
143 c=linspace(2,100,4)';
144 xpols=[x1 x1+20 x1+10 x1+10];
145 ypols=[y1 y1    y1+10 y1-10];
146 cols= [c c($:-1:1) c([3 4 1 2]) c]
147 f.color_map=jetcolormap(max(cols));
148 xfpolys(xpols,ypols,cols)
149  ]]></programlisting>
150         <scilab:image>
151             f=gcf();
152             a=gca();
153             a.data_bounds=[0,-10;40,30];
154             isoview();
155             x1=[0,10,20,10]';
156             y1=[10,0,10,20]';
157             c=linspace(2,100,4)';
158             xpols=[x1 x1+20 x1+10 x1+10];
159             ypols=[y1 y1    y1+10 y1-10];
160             cols= [c c($:-1:1) c([3 4 1 2]) c]
161             f.color_map=jetcolormap(max(cols));
162             xfpolys(xpols,ypols,cols)
163         </scilab:image>
164         <programlisting role="example"><![CDATA[
165 // cores interpoladas
166 clf()
167 f=gcf();
168 x11=[0;20;20;0];
169 y11=[10;10;30;30];
170 c11=[10;10;30;30];
171 x12=x11;
172 y12=y11+20;
173 c12=[20;20;1;1];
174 c12=[30;30;10;10];
175 x21=[0;30;30;0]+22;
176 y21=[20;20;30;30];
177 c21=[20;20;30;30];
178 x22=x21;
179 y22=y21+10;
180 c22=[30;30;20;20];
181 x31=[0;40;40;0]+55;
182 y31=[0;0;30;30];
183 c31=[0;0;30;30];
184 x32=x31;
185 y32=y31+30;
186 c32=[30;30;0;0];
187 X=[x11 x12 x21 x22 x31 x32];
188 Y=[y11 y12 y21 y22 y31 y32];
189 C=([c11 c12 c21 c22 c31 c32]+1)*5;
190 a=gca();
191 isoview();
192 a.data_bounds=[min(X),min(Y);max(X),max(Y)];
193 f=gcf();
194 f.color_map=graycolormap(max(C));
195 xfpolys(X,Y,C)
196  ]]></programlisting>
197         <scilab:image>
198             clf()
199             f=gcf();
200             x11=[0;20;20;0];
201             y11=[10;10;30;30];
202             c11=[10;10;30;30];
203             x12=x11;
204             y12=y11+20;
205             c12=[20;20;1;1];
206             c12=[30;30;10;10];
207             x21=[0;30;30;0]+22;
208             y21=[20;20;30;30];
209             c21=[20;20;30;30];
210             x22=x21;
211             y22=y21+10;
212             c22=[30;30;20;20];
213             x31=[0;40;40;0]+55;
214             y31=[0;0;30;30];
215             c31=[0;0;30;30];
216             x32=x31;
217             y32=y31+30;
218             c32=[30;30;0;0];
219             X=[x11 x12 x21 x22 x31 x32];
220             Y=[y11 y12 y21 y22 y31 y32];
221             C=([c11 c12 c21 c22 c31 c32]+1)*5;
222             a=gca();
223             isoview();
224             a.data_bounds=[min(X),min(Y);max(X),max(Y)];
225             f=gcf();
226             f.color_map=graycolormap(max(C));
227             xfpolys(X,Y,C)
228         </scilab:image>
229     </refsection>
230     <refsection role="see also">
231         <title>Ver Também</title>
232         <simplelist type="inline">
233             <member>
234                 <link linkend="xfpoly">xfpoly</link>
235             </member>
236             <member>
237                 <link linkend="xpoly">xpoly</link>
238             </member>
239             <member>
240                 <link linkend="xpolys">xpolys</link>
241             </member>
242         </simplelist>
243     </refsection>
244 </refentry>