1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
4
<LANGUAGE>eng</LANGUAGE>
8
<TYPE>Scilab Function</TYPE>
10
<DATE>April 1993</DATE>
12
<SHORT_DESCRIPTION name="plot3d1">3D gray or color level plot of a
13
surface</SHORT_DESCRIPTION>
16
<CALLING_SEQUENCE_ITEM>plot3d1(x,y,z,[theta,alpha,leg,flag,ebox])</CALLING_SEQUENCE_ITEM>
18
<CALLING_SEQUENCE_ITEM>plot3d1(xf,yf,zf,[theta,alpha,leg,flag,ebox])</CALLING_SEQUENCE_ITEM>
20
<CALLING_SEQUENCE_ITEM></CALLING_SEQUENCE_ITEM>
22
<CALLING_SEQUENCE_ITEM>plot3d1(x,y,z,<opts_args>)</CALLING_SEQUENCE_ITEM>
24
<CALLING_SEQUENCE_ITEM>plot3d1(xf,yf,zf,<opts_args>)</CALLING_SEQUENCE_ITEM>
30
<PARAM_NAME>x,y</PARAM_NAME>
33
<SP>: row vectors of sizes n1 and n2 (x-axis and y-axis
34
coordinates). These coordinates must be monotone.</SP>
39
<PARAM_NAME>z</PARAM_NAME>
42
<SP>: matrix of size (n1,n2). <VERB>z(i,j)</VERB> is the value of
43
the surface at the point (x(i),y(j)).</SP>
48
<PARAM_NAME>xf,yf,zf</PARAM_NAME>
51
<SP>: matrices of size (nf,n). They define the facets used to draw
52
the surface. There are <VERB>n</VERB> facets. Each facet
53
<VERB>i</VERB> is defined by a polygon with <VERB>nf</VERB> points.
54
The x-axis, y-axis and z-axis coordinates of the points of the ith
55
facet are given respectively by <VERB>xf(:,i)</VERB>,
56
<VERB>yf(:,i)</VERB> and <VERB>zf(:,i)</VERB>.</SP>
61
<PARAM_NAME><opt_args></PARAM_NAME>
64
<SP>: This represents a sequence of statements <VERB>key1=value1,
65
key2=value2</VERB>,... where <VERB>key1</VERB>,
66
<VERB>key2,...</VERB> can be one of the following: theta, alpha
67
,leg,flag,ebox (see definition below).</SP>
72
<PARAM_NAME>theta, alpha</PARAM_NAME>
75
<SP>: real values giving in degree the spherical coordinates of the
76
observation point.</SP>
81
<PARAM_NAME>leg</PARAM_NAME>
84
<SP>: string defining the labels for each axis with @ as a field
85
separator, for example "X@Y@Z".</SP>
90
<PARAM_NAME>flag</PARAM_NAME>
93
<SP>: a real vector of size three.
94
<VERB>flag=[mode,type,box]</VERB>.</SP>
98
<PARAM_NAME>mode</PARAM_NAME>
101
<SP>: an integer (surface color).</SP>
105
<PARAM_NAME>mode>0</PARAM_NAME>
108
<SP>: the surface is painted with color
109
<VERB>"mode"</VERB> ; the boundary of the facet is drawn
110
with current line style and color.</SP>
115
<PARAM_NAME>mode=0:</PARAM_NAME>
118
<SP>a mesh of the surface is drawn.</SP>
123
<PARAM_NAME>mode<0:</PARAM_NAME>
126
<SP>the surface is painted with color
127
<VERB>"-mode"</VERB> ; the boundary of the facet is not
130
<P>Note that the surface color treatement can be done
131
using <VERB>color_mode</VERB> and
132
<VERB>color_flag</VERB> options through the surface
133
entity properties (see
134
<LINK>surface_properties</LINK>).</P>
142
<PARAM_NAME>type</PARAM_NAME>
145
<SP>: an integer (scaling).</SP>
149
<PARAM_NAME>type=0:</PARAM_NAME>
152
<SP>the plot is made using the current 3D scaling (set
153
by a previous call to <VERB>param3d</VERB>,
154
<VERB>plot3d</VERB>, <VERB>contour</VERB> or
155
<VERB>plot3d1</VERB>).</SP>
160
<PARAM_NAME>type=1:</PARAM_NAME>
163
<SP>rescales automatically 3d boxes with extreme aspect
164
ratios, the boundaries are specified by the value of the
165
optional argument <VERB>ebox</VERB>.</SP>
170
<PARAM_NAME>type=2:</PARAM_NAME>
173
<SP>rescales automatically 3d boxes with extreme aspect
174
ratios, the boundaries are computed using the given
180
<PARAM_NAME>type=3:</PARAM_NAME>
183
<SP>3d isometric with box bounds given by optional
184
<VERB>ebox</VERB>, similarily to
185
<VERB>type=1</VERB>.</SP>
190
<PARAM_NAME>type=4:</PARAM_NAME>
193
<SP>3d isometric bounds derived from the data, to
194
similarily<VERB>type=2</VERB>.</SP>
199
<PARAM_NAME>type=5:</PARAM_NAME>
202
<SP>3d expanded isometric bounds with box bounds given
203
by optional <VERB>ebox</VERB>, similarily to
204
<VERB>type=1</VERB>.</SP>
209
<PARAM_NAME>type=6:</PARAM_NAME>
212
<SP>3d expanded isometric bounds derived from the data,
213
similarily to <VERB>type=2</VERB>.</SP>
215
<P>Note that axes boundaries can be customized through
216
the axes entity properties (see
217
<LINK>axes_properties</LINK>).</P>
225
<PARAM_NAME>box</PARAM_NAME>
228
<SP>: an integer (frame around the plot).</SP>
232
<PARAM_NAME>box=0:</PARAM_NAME>
235
<SP>nothing is drawn around the plot.</SP>
240
<PARAM_NAME>box=1:</PARAM_NAME>
243
<SP>unimplemented (like box=0).</SP>
248
<PARAM_NAME>box=2:</PARAM_NAME>
251
<SP>only the axes behind the surface are drawn.</SP>
256
<PARAM_NAME>box=3:</PARAM_NAME>
259
<SP>a box surrounding the surface is drawn and captions
265
<PARAM_NAME>box=4:</PARAM_NAME>
268
<SP>a box surrounding the surface is drawn, captions and
271
<P>Note that axes aspect can also be customized through
272
the axes entity properties (see
273
<LINK>axes_properties</LINK>).</P>
284
<PARAM_NAME>ebox</PARAM_NAME>
287
<SP>: It specifies the boundaries of the plot as the vector
288
<VERB>[xmin,xmax,ymin,ymax,zmin,zmax]</VERB>. This argument is used
289
together with <VERB>type</VERB> in <VERB>flag</VERB> : if it is set
290
to <VERB>1</VERB>, <VERB>3</VERB> or <VERB>5</VERB> (see above to
291
see the corresponding behaviour). If <VERB>flag</VERB> is missing,
292
<VERB>ebox</VERB> is not taken into acoount.</SP>
294
<P>Note that, when specified, the <VERB>ebox</VERB> argument acts on
295
the <VERB>data_bounds</VERB> field that can also be reset through
296
the axes entity properties (see <LINK>axes_properties</LINK>).</P>
303
<P><VERB>plot3d1</VERB> plots a surface with colors depending on the
304
z-level of the surface. This special plot function can also be enabled
305
setting <VERB>color_flag=1</VERB> after a <VERB>plot3d</VERB> (see
306
<LINK>surface_properties</LINK>)</P>
308
<P>Enter the command <VERB>plot3d1()</VERB> to see a demo.</P>
311
<EXAMPLE><![CDATA[// simple plot using z=f(x,y)
312
t=[0:0.3:2*%pi]'; z=sin(t)*cos(t');
314
// same plot using facets computed by genfac3d
315
[xx,yy,zz]=genfac3d(t,t,z);
320
plot3d1([xx xx],[yy yy],[zz 4+zz])
321
// simple plot with viewpoint and captions
323
plot3d1(1:10,1:20,10*rand(10,20),35,45,"X@Y@Z",[2,2,3])
324
// same plot without grid
326
plot3d1(1:10,1:20,10*rand(10,20),35,45,"X@Y@Z",[-2,2,3])
327
// plot of a sphere using facets computed by eval3dp
328
deff("[x,y,z]=sph(alp,tet)",["x=r*cos(alp).*cos(tet)+orig(1)*ones(tet)";..
329
"y=r*cos(alp).*sin(tet)+orig(2)*ones(tet)";..
330
"z=r*sin(alp)+orig(3)*ones(tet)"]);
332
[xx,yy,zz]=eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,20));
339
plot3d1(xx,yy,zz) // the 2 graphics are similar
365
<AUTHOR>J.Ph.C.</AUTHOR>
b'\\ No newline at end of file'