1 <?xml version="1.0" encoding="ISO-8859-1"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) ENPC - Jean-Philippe Chancelier
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises
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.
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:ns3="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="Sfgrayplot" xml:lang="en">
18 <refname>Sfgrayplot</refname>
19 <refpurpose>esboço 2d suave de uma superfície definida por uma função
24 <title>Seqüência de Chamamento</title>
25 <synopsis>Sfgrayplot(x,y,f,<opt_args>)
26 Sfgrayplot(x,y,f [,strf, rect, nax, zminmax, colminmax, mesh, colout])
30 <title>Parâmetros</title>
35 <para>vetores linhas de reais de tamanhos n1 e n2. </para>
41 <para>função do Scilab (z=f(x,y)) </para>
45 <term><opt_args></term>
48 representa uma seqüência de declarações <literal>key1=value1,
51 ,... onde <literal>key1</literal>,
52 <literal>key2,...</literal> podem ser um dos seguintes: strf, rect,
53 nax, zminmax, colminmax, mesh, colout (ver <link linkend="plot2d">plot2d</link> para os três primeiros e <link linkend="fec">fec</link> para os quatro últimos).
58 <term>strf,rect,nax</term>
61 ver <link linkend="plot2d">plot2d</link>.
66 <term>zminmax, colminmax, mesh, colout</term>
69 ver <link linkend="fec">fec</link>.
76 <title>Descrição</title>
78 <literal>Sfgrayplot</literal> é o mesmo que
79 <literal>fgrayplot</literal> mas o esboço é suavizado. A função
80 <literal>fec</literal> é utilizada para suavização. A superfície é
81 esboçada assumindo-se que é linear em um conjunto de triângulos
82 construídos a partir do grid (aqui, com n1=5, n2=3):
92 A função <link linkend="colorbar">colorbar</link> pode ser utilizada
93 para se visualizar a escala de cores (mas você deve saber (ou computar) os
94 valores mínimo e máximo).
97 Ao invés de Sfgrayplot, você pode usar <link linkend="Sgrayplot">Sgrayplot</link> este pode ser um pouco mais
101 Entre com o comando <literal>Sfgrayplot()</literal> para visualizar
106 <title>Exemplos</title>
107 <programlisting role="example"><![CDATA[
108 // exemplo #1: esboço de 4 superfícies
109 function z=surf1(x,y), z=x*y, endfunction
110 function z=surf2(x,y), z=x^2-y^2, endfunction
111 function z=surf3(x,y), z=x^3+y^2, endfunction
112 function z=surf4(x,y), z=x^2+y^2, endfunction
114 set(gcf(),"color_map",[jetcolormap(64);hotcolormap(64)])
115 x = linspace(-1,1,60);
116 y = linspace(-1,1,60);
119 colorbar(-1,1,[1,64])
120 Sfgrayplot(x,y,surf1,strf="041",colminmax=[1,64])
121 xtitle("f(x,y) = x*y")
123 colorbar(-1,1,[65,128])
124 Sfgrayplot(x,y,surf2,strf="041",colminmax=[65,128])
125 xtitle("f(x,y) = x^2-y^2")
127 colorbar(-1,2,[65,128])
128 Sfgrayplot(x,y,surf3,strf="041",colminmax=[65,128])
129 xtitle("f(x,y) = x^3+y^2")
132 Sfgrayplot(x,y,surf4,strf="041",colminmax=[1,64])
133 xtitle("f(x,y) = x^2+y^2")
138 function z=surf1(x,y), z=x*y, endfunction
139 function z=surf2(x,y), z=x^2-y^2, endfunction
140 function z=surf3(x,y), z=x^3+y^2, endfunction
141 function z=surf4(x,y), z=x^2+y^2, endfunction
143 set(gcf(),"color_map",[jetcolormap(64);hotcolormap(64)])
144 x = linspace(-1,1,60);
145 y = linspace(-1,1,60);
148 colorbar(-1,1,[1,64])
149 Sfgrayplot(x,y,surf1,strf="041",colminmax=[1,64])
150 xtitle("f(x,y) = x*y")
152 colorbar(-1,1,[65,128])
153 Sfgrayplot(x,y,surf2,strf="041",colminmax=[65,128])
154 xtitle("f(x,y) = x^2-y^2")
156 colorbar(-1,2,[65,128])
157 Sfgrayplot(x,y,surf3,strf="041",colminmax=[65,128])
158 xtitle("f(x,y) = x^3+y^2")
161 Sfgrayplot(x,y,surf4,strf="041",colminmax=[1,64])
162 xtitle("f(x,y) = x^2+y^2")
165 <programlisting role="example"><![CDATA[
166 // exemplo #2: esboço de surf3 e adição de algumas linhas de contorno
167 function z=surf3(x,y), z=x^3+y^2, endfunction
169 x = linspace(-1,1,60);
170 y = linspace(-1,1,60);
171 set(gcf(),"color_map",hotcolormap(128))
174 Sfgrayplot(x,y,surf3,strf="041")
175 fcontour2d(x,y,surf3,[-0.1, 0.025, 0.4],style=[1 1 1],strf="000")
176 xtitle("f(x,y) = x^3+y^2")
181 function z=surf3(x,y), z=x^3+y^2, endfunction
183 x = linspace(-1,1,60);
184 y = linspace(-1,1,60);
185 set(gcf(),"color_map",hotcolormap(128))
188 Sfgrayplot(x,y,surf3,strf="041")
189 contour2d(x,y,surf3,[-0.1, 0.025, 0.4],style=[1 1 1],strf="000")
190 xtitle("f(x,y) = x^3+y^2")
194 <programlisting role="example"><![CDATA[
195 // exemplo #3: esboço de surf3 e uso dos argumentos opcionais zminmax e colout
196 // para restringir o esboço em -0.5<= z <= 1
197 function z=surf3(x,y), z=x^3+y^2, endfunction
199 x = linspace(-1,1,60);
200 y = linspace(-1,1,60);
201 set(gcf(),"color_map",jetcolormap(128))
203 zminmax = [-0.5 1]; colors=[32 96];
204 colorbar(zminmax(1),zminmax(2),colors)
205 Sfgrayplot(x, y, surf3, strf="041", zminmax=zminmax, colout=[0 0], colminmax=colors)
206 fcontour2d(x,y,surf3,[-0.5, 1],style=[1 1 1],strf="000")
207 xtitle("f(x,y) = x^3+y^2, com partes abaixo de z = -0.5 e acima de z = 1 removidas")
211 <scilab:image localized="true">
212 function z=surf3(x,y), z=x^3+y^2, endfunction
214 x = linspace(-1,1,60);
215 y = linspace(-1,1,60);
216 set(gcf(),"color_map",jetcolormap(128))
218 zminmax = [-0.5 1]; colors=[32 96];
219 colorbar(zminmax(1),zminmax(2),colors)
220 Sfgrayplot(x, y, surf3, strf="041", zminmax=zminmax, colout=[0 0], colminmax=colors)
221 contour2d(x,y,surf3,[-0.5, 1],style=[1 1 1],strf="000")
222 xtitle("f(x,y) = x^3+y^2, com partes abaixo de z = -0.5 e acima de z = 1 removidas")
227 <refsection role="see also">
228 <title>Ver Também</title>
229 <simplelist type="inline">
231 <link linkend="fec">fec</link>
234 <link linkend="fgrayplot">fgrayplot</link>
237 <link linkend="grayplot">grayplot</link>
240 <link linkend="Sgrayplot">Sgrayplot</link>