|
|
|
|
|
Home
:: Function Reference |
|
|
|
|
Function Reference
|
|
|
|
|
HERE we will summarize all 3D-plotting functions,
and in this version, we have benn able to deal with
most of 3d plot function in scilab 2.6, including
plot3d, plot3d1, plot3d2, plot3d3, fac3d, fac3d1,
param3d, param3d1, xset, xsetech and xbasc.And all
of them are written in scilab scripts . Now you
could take a brief look at all these funtions, as
follows.
CAUTIONS:before exec all these functions in scilab2.6,
we use a tcl script to convert the user's sci script
into a new one, which not only means that we just
change the function name into it's v-version, but
we also make a lot of changeS including the parameter
given by the user.
And we will discuss it in detail in the documentation
of scitonewsci.tcl.
-
PLOT3D --> VPLOT_3D
We just transfer the first three parameters to
the function vplot_3d, they are either matrices
or vectors,and the parameter such as "flag","leg","type"...
are all eliminated. Fortunately, we could get
different sights and change viewpoint freely in
VRML.
We will first judge the type of the argument.
Finally,we find that there are in all 3 types
of arguments(the first threee arguments), VVM,
MMM, MML.(V stands for vector, M for matrix and
L for list(M, color)) Since the VVM is in reality
equivalent to MMM in plotting , we convert it
into the MMM type, that is, drawing a surface
defined by a set of facets. In this situation,
the function will output two temp files: temp_matrix.txt
and temp_index.txt contains the data of points
and their index used in .wrl files.
Another alternative, however, are something of
great complexity(z is a list consists of both
point matrix and facet color matrix/vector) .In
this version,we can deal with the color vector
it would output two files aditionally----temp_color.txt
and temp_cindex.txt,they contain the information
needed for color plotting. Unfortunately , we
can't support the situation when color argument
in z(list) is a matrix, cause we know nothing
about the interpolation algorithm. In this case
,we will just give a warning dialog and continue,we
feel regret about this , and may be in the next
version we can fix this problem.
-
PLOT3D1 --> VPLOT_3D1
Er...,this is an intresting function,we found
nothing about its color generating process in
the official documentation. And later we found
that the color index involved in this function
is closely connected with "colormap"
, which has a default value and can also be defined
in the function xset(we have the corresponding
vx_set), the default colormap is a 32*3 matrix
. we have figured out its default colormap,coverted
it to r g b form definded in vrml files(value
of 0~1). To link the colormap to vplot3d1,we set
vplot3d 4 arguments--(colormap,x,y,z), we save
the max and min of "z" and use them
to calculate the color index of each facets,which
is the main difference between plot3d1 and plot3d
. SEE ALSO VXSET.
-
XSET --> VX_SET
Xset is such a complicated function and have close
link with the GraphicWindows.we are nearly impossible
to write a vxset the same as xset. ....And in
fact , the whole process has so much differences
with the vrml definition. So, we can only support
the "colormap" setting at last. it just
return the color matrix and transfer it to vplot3d1.
SEE ALSO VPLOT_3D1.
-
PARAM3D --> VPARAM_3D
As we have done in vplot3d, we get the first three
parameter from param3d which are vectors of the
same size. We convert column vectors into row
vectors and enable the function to output two
temp files: temp_matrix.txt and temp_index.txt.
- PARAM3D1 --> VPARAM_3D1
To do multiple plots with color, we use the function
vparam3d1. We get the first three arguments from
param3d1 as usual. Then we judge if it contains
the color information. If not, we write two temp
files just as we have done in the previous function.
Otherwise, we additionally write two other temp
files so that the essential color information in
the .wrl file will be easily gained.
- PLOT3D2 --> VPLOT_3D2 and
PLOT3D3 -->VPLOT_3D3
When We have nearly give up this two functions,we
find great help in the scilab macro.
plot3d2 and plot3d3 just call plot3d and plot3d1
to finish the task. So we can also first use nf3d
function to generate standard point matrixs and
transfer them to vplot3d and vplot3d1.
-
XBASC --> VXBASC and
XSETECH --> VXSETECH
The function xbasc can clear the GraphicWindows,the
xsetech will plot several graphic in one windows.But
when we plot many shape in one windows, it seems
strange, and sometimes the file will grow so big
that it's hard to be open. So we dicide to make
the vxbasc and vxsetech creat new vrml files,which
means that the plot function between in xbasc
or xsetech will be plot in a vrml file. We recommaned
the user who want to see the frame plot such as
xsetech to embeded each vrml files in the html
frame.
-
FAC3D-->VFAC_3D and
FAC3D1-->VFAC_3D1
fac3d and fac3d1 are obsolete useage of plot3d
and plot3d1,but we also support them.
-
FPLOT3D-->VFPLOT_3D and
FPLOT3D1-->VFPLOT_3D1
Another usege of plot3d and plot3d1. no much to
say.
|
|
|
|
|
|
|