For 2D plot, you may consider to render a scene to the enhanced meta file (EMF). Because EMF is a vector graph format, its print-out quality is very high.
For a web application or demonstration, saving a scene to WRL (the format of Virtual Reality Modeling Language) may be the best way to maintain 3D details of the scene.
Function |
Parameter Type |
Remark |
zegraph(name[,...]); |
string |
Returns a ZeGraph object if only one argument is used; otherwise returns an array
of ZeGraph objects. Eligible type include "axis", "color", "colorbar", "font", "globe", "light",
"line", "material", "node",
"point", "plot", "polygon",
"render", "scene",
"texcoord", "text", "texture",
and "vertex". |
enable(obj, ...) |
user |
Enables objects. |
disable(obj, ...) |
user |
disables objects. |
direction(x1, y1, z1, x2, y2, z2) |
numbers |
Returns an array with latitude in [0] and longitude in [1] that represent
the vector direction from (x1, y1, z1) to (x2, y2, z2). |
normal(x0, y0, z0, x1, y1, z1, x2, y2, z2, flag) |
numbers, string |
If flag="line", returns an array with x in [0], y in [1], and z in [2] as the line (p(x0,
y0, z0), p(x1, y1, z1), p(x2, y2, z2) ) normal at (x1, y1, z1); otherwise, returns an array with x in [0], y in [1], and z in [2] as the normal of
the plane determined by vectors of (x1-x0, y1-y0, z1-z0) and (x2-x0, y2-y0,
z2-z0). |
aitoff(lon, lat[, scale]) |
numbers |
Aitoff map projection. Refer to corresponding function of vertex for details. |
denoyer(lon, lat[, scale]) |
numbers |
Denoyer map projection. Refer to corresponding function of vertex for details. |
echert(lon, lat[, scale]) |
numbers |
Echert V map projection. Refer to corresponding function of vertex for details. |
wagner(lon, lat[, scale]) |
numbers |
Wagner II map projection. Refer to corresponding function of vertex for details. |
ll2xyz(lon, lat[, r]) |
numbers |
Transforms longitude-latitude in degree to x-y-z on a spherical
surface with radius r (default is 1). Returns an array. |
xyz2ll(x, y, z) |
numbers |
Transforms x-y-z to longitude-latitude in degree. Returns an array. |
.angle(deg) |
number |
Rotates the axis about itself for the given degree. Note that you should set the axis type first. |
.color(r, g, b) |
numbers |
Sets axis color. |
.font(fnt, n) |
user, number |
Sets to the axis the font object fnt with font size of n points. |
.offset(dx,dy, dz) |
numbers |
Moves the axis off the origin of the global coordinate. |
.range(min, max) |
numbers |
Sets axis range. |
.showticks(flag) |
boolean |
Shows (flag=true) or suppress axis ticks. |
.showlabels(flag) |
boolean |
Shows (flag= true) or suppress axis labels and title. |
.title(str) |
string |
Sets axis title. Refer to the string function of text
for using subscript, superscript, and symbols. |
.tickmarks(start, end, step, minor) |
numbers |
Sets axis tick marks, i.e., the start and end values, the step between major
ticks, and the number of minor tickmarks between major tickmarks. |
.ticksize(factor) |
number |
Scales up or down the tick length. |
.ticklabels(label[, label,...[center]]) |
strings, boolean |
Customizes tick labels. If The last optional parameter is boolean and true, labels will be positioned between major ticks.
Refer to the string function of text for using subscript, superscript, and symbols. |
.tickdigits(n[, flag]) |
integer, boolean |
Sets tick number digits. Uses exponential format if flag= true. |
.type(type[, flag]) |
string, boolean |
Sets axis as x-, y-, or z-axis if type is "x", "y",
or "z". If flag=true, x-axis ticks point down,
y-axis ticks point to the left, and z-axis ticks point to the left. Use false to change tick directions. |
.width(w) |
number |
Sets the line width of axis. |
.add(r, g, b[, a[, r, g, b, a...]]) |
numbers |
Adds data of red, green, blue and alpha to the color object. Color
data should be between 0 and 1. |
.add(ptr, n) |
number |
Adds data to the color object. The object ptr is a pointer
to n double data, consisted of red, green, blue, and alpha.
Color data should be between 0 and 1. |
.clear() |
|
Clears data in the color object. |
.print([fname]) |
string |
Print color data to the screen or the file. |
.ptr() |
|
Returns array containing float pointer to color data, number of data, and bytes of float type. Data are arranged as r1, g1, b1, a1, r2, g2, b2, a2, and so on. |
.size() |
|
Returns the number of color datasets in the caller. |
.set(index, r, g, b,[ a]) |
integer, number, number, number , number |
Sets red, green, blue, and alpha to the color data at the index. |
.add(obj) |
user |
Adds an object to a special node in the globe. Returns the node object. |
.add(obj, lon, lat) |
user, number, number |
Adds an object to a special node in the globe and sets the objects at given longitude and latitude. Returns the node object. |
.add(obj, X, Y, n) |
user, user, user, number |
Adds an object to a special node in the globe and sets the objects at given longitude (X) and latitude (Y). X and Y must be pointers to n double data. Returns the node object. |
.clear() |
|
Clears objects added to the globe. |
.focus(lon, lat) |
numbers |
Sets view focus point at the given longitude and latitude. |
.field(U, V, X, nx, Y, ny, r, colorbar) |
user, user, user, integer, user, integer, number, user |
Creates cones to present wind field. U and V are pointers to data of double of u- and v-wind; X is pointer to nx data of double of x-grid; Y is pointer to ny data of double of y-grid; r is the bottom radius of a cone; and colorbar object is used to set cone color according to wind speed. |
.grid(deg[, width]) |
integer, number |
Creates lines of given width to form longitude/latitude grid in given degree interval. Returns the node object that contains those lines. |
.gshhs(fname[, width]) |
string, number |
Reads GSHHS data from fname and creates line objects to present coastlines. If not set, the default line width is 1. Returns the node object that contains those lines. The longitude of coastlines range from -180 to 180. |
.keep() |
|
Keeps the last added object so that it will not be cleared. |
.light() |
user |
Gets the light of the globe. |
.light(x, y, z) |
numbers |
Sets the light position of the globe. |
.line(lon1, lat1, lon2, lat2) |
numbers |
Draws a line from (lon1, lat1) to (lon2, lat2). Returns the line onject. |
.radius(r) |
number |
Sets globe radius to be used by field, grid, gshhs, and line functions. The radius may be reset by surface and texture functions. |
.sun(day,hour) |
integers |
Sets the light position so that the light acts like the sun. |
.surface(r[, iters]) |
number, integer |
Creates triangles to form the surface of globe and returns a polygon object. The optional parameter iters (between 1 and 8) may be used to specify the fineness of surface triangles. |
.texture(r, fname[, flag]) |
number, string, boolean |
Creates quads to form the surface of globe with radius of r and uses the image in fname as texture. You should set the optional flag to true if the image represents a map for longitude of -180 to 180 degree. It returns a texture object that may be used by other polygons. |
.texture(r, data, nrow, ncol, colorbar[, flag]) |
number, string, boolean |
Creates quads to form the surface of globe with radius of r and uses data and colorbar to create texture for the surface. data should points to nrow by ncol data of double-type and colorbar must be a color bar object. You should set the optional flag to true if the data represent grids for longitude of -180 to 180 degree. It returns a texture object that may be used by other polygons. |
.add(...) |
numbers or users |
Adds data to the vertex object of line. Returns the vertex object. Refer to the add function of vertex for details. |
.color(r, g, b[, a]) |
numbers |
Sets line color. |
.color(color) |
user |
Sets the color object to the line as per vertex color. |
.color() |
|
Returns the vertex color object of the line. |
.vertex(vertex) |
user |
Sets vertex to the line |
.vertex() |
|
Returns the vertex object of the line. |
.normal(vertex) |
user |
Sets vertex object to the line as vertex normal |
.normal() |
|
Returns the vertex normal object of the line. |
.dot(width[, factor]) |
numbers |
Sets the line style as dot of given width. The factor determines
length to width ratio between dots. |
.dash(width[, factor]) |
numbers |
Sets the line style as dash of given width. The factor determines
length to width ratio between dashes. |
.dotdash(width[, factor]) |
numbers |
Sets the line style as dot-dash of given width. The factor determines
length to width ratio between dot-dashes. |
.solid(width) |
number |
Sets the line style as solid of given width. |
.smooth(flag) |
true/false |
Renders smooth lines if flag is true. |
.type( typename) |
string |
Sets the line type. Eligible typename include "lines", "loop", "strip". |
.rotatex(degree) |
number |
Sets x-rotation transform, i.e., rotates all vertices in the line around x-axis. |
.rotatey(degree) |
number |
Sets y-rotation transform, i.e., rotates all vertices in the line around y-axis. |
.rotatez(degree) |
number |
Sets z-rotation transform, i.e., rotates all vertices in the line around z-axis. |
.scale(x, y, z) |
number |
Sets scale transform, i.e., scales all vertices in the line along x-,y-, and z-axis. |
.translate(x, y, z) |
numbers |
Sets translation transform, i.e., moves all vertices in the line along x-,y-, and z-axis. |
.reset() |
|
Resets transform to none. |
.gshhs(fname, west, east, south, north) |
string, numbers |
Reads coastline data from GSHHS data file to make map. west>=-180, east<=360, south>=-90, and north<=90. |
.circle(r) |
numbers |
Adds vertex and normal to the line to form a circle on the x-y plane. |
.contour(Z, X, nx, Y, ny, iso) |
user, user, number, user, number, number |
Adds to the line object vertex data from contouring for the iso-value
(iso) found for Z at regular grids (X, Y). Returns a vertex object. X, Y, and Z must be pointer of double of nx, ny, and nx*ny number of data, respectively. |
.contour(X, Y, Z, I, n, iso) |
user, user, user, user, number, number |
Adds to the line object vertex data from contouring for the iso-value
(iso) found in triangles that are results of the delaunay() function in
the matrix library. I and n are the
pointer to triangle indices and the number of triangles, respectively. Returns
a vertex object. |
.contour(vertex, n, iso) |
user, integer, number |
Adds to the line object vertex data from contouring for the iso-value
(iso) found in data of the vertex object. n must be 3 or 4, indicating whether a dataset
of vertex forms a triangle or quads. |
.vector(u, v, size) |
numbers |
Adds to the line object vertices to form an wind vector. |
.add(obj) |
user |
Adds an object to the plot. |
.add(obj, x, y, z) |
user, numbers |
Anchors the object at (x, y, z) in the plot coordinate. An anchored object
will not be affected by the rotation and scaling transforms of the plot. |
.add(obj, X, Y, Z, n) |
user, user, user, user, integer |
Anchors the object at (X, Y, Z) in the plot coordinate. X, Y, and Z must
be pointers to n double data. |
.clabel(line, text, density, r, g, b) |
user, user, integer, number, number, number |
Adds contour labels to the plot. line must be a line object with contour vertices (see line.contour() function); text must be a text object; density > 0 specifies how frequent labels will be drawn along the line; and the rest of the parameters define the background color of labels. |
.clear() |
|
Clears objects added to the plot by add and anchor functions. |
.rotate(zdeg, xdeg) |
numbers |
Sets the z- and x-rotation transform, i.e., rotate about z-axis first and
then about the x-axis. |
.scale(x, y, z) |
numbers |
Sets the scale transform |
.font(fnt, n) |
user, number |
Sets to the plot the font object fnt with font size of n points. |
.field(U, V, X, Y, n, size, colorbar) |
user, user, user, user, integer, number, user |
Plots 2D vector field. U, V, X, and Y must be double pointers to n data. U and V should have wind data scaled to produce proper size vectors.
The size parameter determines the arrow head size; and the colorbar object
is used to assign colors to vectors according to their sizes. |
.field(U, V, X, nx, Y, ny, size, colorbar) |
user, user, user, integer, user, integer, number, user |
Plots 2D vector field. U and V should be double pointers to
nx*ny wind data scaled to produce proper size vectors; X and Y are double
pointers to grid coordinates. The size parameter determines
the arrow head size; and the colorbar object is used to assign colors to
vectors according to their sizes. |
.field(U, V, W, X, Y, Z, n, size, colorbar) |
user, user, user, user, user, user, integer, number, user |
Plots 3D field using cones. Parameters have similar meaning to those of
field(U, V, X, Y, n, size, colorbar) function. |
.field(U, V, W, X, nx, Y,ny, Z, nz, size, colorbar) |
user, user, user, user, integer, user, integer, user, integer, number,
user |
Plots 3D field using cones. Parameters have similar meaning to those of
field(U, V, X, nx, Y, ny, size, colorbar) function. |
.global(x, y, z) |
numbers |
Returns an array containing the global coordinate converted from the local
coordinate (x, y, z), i.e., [0] = x, [1] = y, and [2] = z. |
.local(x, y, z) |
numbers |
Returns an array containing the local coordinate converted from the global
coordinate (x, y, z), i.e., [0] = x, [1] = y, and [2] = z. |
.xaxis(xdir, ydir, zdir) |
numbers |
Anchors the x-axis of the plot. The signs of xdir, ydir, and zdir control
the direction that the axisl moves away from the origin. Returns the x-axis object. |
.xaxis() |
|
Returns the x-axis of the plot for further manipulation by axis functions. |
.yaxis(xdir, ydir, zdir) |
numbers |
Anchors the y-axis of the plot. The signs of xdir, ydir, and zdir control
the direction that the axisl moves away from the origin. Returns the y-axis object. |
.yaxis() |
|
Returns the y-axis of the plot for further manipulation by axis functions. |
.zaxis(xdir, ydir, zdir) |
numbers |
Anchors the z-axis of the plot. The signs of xdir, ydir, and zdir control
the direction that the axisl moves away from the origin. Returns the z-axis object. |
.zaxis() |
|
Returns the z-axis of the plot for further manipulation by axis functions. |
.add(...) |
numbers or users |
Adds data to the vertex object of point. Returns the vertex object. Refer to the add function of vertex for details. |
.color(r, g, b[, a]) |
numbers |
Sets point object color. |
.color(color) |
user |
Sets color object to the point object as per vertex color. |
.color() |
|
Returns the vertex color object of the point. |
.vertex(vertex) |
user |
Sets the vertex object of the point |
.vertex() |
|
Returns the vertex object of the point. |
.normal(vertex) |
user |
Sets the vertex object to the point as vertex normal |
.normal() |
|
Returns the vertex normal object of the point. |
.size(n) |
number |
Sets the point size in pixel. |
.smooth(flag) |
boolean |
Renders point as round dot if flag=true; otherwise as square. |
.rotatex(degree) |
number |
Sets x-rotation transform, i.e., rotates all vertices in the point around x-axis. |
.rotatey(degree) |
number |
Sets y-rotation transform, i.e., rotates all vertices in the point around y-axis. |
.rotatez(degree) |
number |
Sets z-rotation transform, i.e., rotates all vertices in the point around y-axis. |
.scale(x, y, z) |
numbers |
Sets scale transform, i.e., scales all vertices in the point along x-, y-, and z-axis. |
.translate(x, y, z) |
numbers |
Sets translation transform, i.e., moves all vertices in the point along x-, y-, and z-axis. |
.reset() |
|
Resets transform to none. |
.bmp(fame[,bgR, bgG, bgB]) |
string, integer, integer, integer |
Adds to the point vertex and color objects that contains pixel coordinates (x from o to width-1; y from 0 to image height-1, z = 0) and colors of the image in the file. If the background color is specified and range from 0 to 255, pixels with the background color will be excluded. It returns image with and height as array. |
.add(...) |
numbers or users |
Adds data to the vertex object of polygon. Returns the vertex object. Refer to the add function of vertex for details. |
.color(r, g, b[, a]) |
numbers |
Sets polygon color. |
.color(color) |
user |
Sets the color object to the polygon as per vertex color. |
.color() |
|
Returns the vertex color object of the polygon. |
.vertex(vertex) |
user |
Sets the vertex object of the polygon. |
.vertex() |
|
Returns the vertex object of the polygon |
.normal(vertex) |
user |
Sets the vertex object to the polygon as vertex normal. |
.normal() |
|
Returns the vertex normal object of the polygon. |
.texcoord(texcoord) |
user |
Sets texture coordinate object to the polygon. |
.texcoord() |
|
Returns the texture coordinate object of the polygon. |
.clockwise(flag) |
boolean |
Sets the polygon winding to clockwise if flag=true. |
.cull(flag) |
number |
Seta cull face to none if flag=0, to cull front if flag>0, and
to cull back if flag<0. |
.fill(flag) |
number |
Renders polygon as points if flag=0, as filled if flag>0, and as lines
if flag<0. |
.gshhs(fname, west, east, north, south) |
string, numbers |
Reads coastline data from GSHHS data file to make filled map. west>=0, east<=360, south>=-90, and north<=90. If you want a filled map with west<0, you must call the function with west>180 and east<=360 and then call vertex's translate function to convert longitude to -180 to 0. |
.type(name) |
string |
Sets the polygon type. Eligible typename include "triangles", "trianglestrip",
"trianglefan", "quads", "quadstrip", and "polygon". |
.smooth(flag) |
boolean |
Renders smooth polygon edges if flag=true. |
.width(w) |
number |
Sets polygon line width. |
.rotatex(degree) |
number |
Sets x-rotation transform, i.e., rotates all vertices in the polygon around x-axis. |
.rotatey(degree) |
number |
Sets y-rotation transform, i.e., rotates all vertices in the polygon around y-axis. |
.rotatez(degree) |
number |
Sets z-rotation transform, i.e., rotates all vertices in the polygon around z-axis. |
.scale(x, y, z) |
numbers |
Sets scale transform, i.e., scales all vertices in the polygon along x-, y-, and z-axis. |
.translate(x, y, z) |
numbers |
Sets translation transform, i.e., moves all vertices in the polygon along x-, y-, and z-axis. |
.reset() |
|
Resets transform to none. |
.material(mat) |
user |
Sets the material object to the polygon. |
.texture(tex) |
user |
Sets the texture object to the polygon. |
.implicit(func, x1, x2, y1, y2, z1, z2, n) |
string, number, number, number, number, number, number, integer |
Creates implicit surface of func(x,y,z)=0. x1 and x2 specify x-ranges; y1 and y2 specify y-range; z1 and z2 specify z-range; and n specifies the number of grids in a range. |
.uvsurface(func, u1, u2, v1, v2, n) |
string, number, number, number, number, integer |
Creates surface of x(u, v), y(u, v), and z(u, v) in the range of u1 to u2 and v1 to v2. n specifies the number of grids in u- and v-range. The callback function func(u, v) should return an array [x, y, z] for each (u, v). |
.isosurface(W, X, nxl, Y, ny, Z, nzl, iso) |
user, user, number, user, number, user, number, number |
Adds vertex and normal objects to the polygon. Vertex data representing
triangles of iso-surfaces of 4D data W on 3D regular grids of X, Y, and
Z. These user objects must be pointers to data of double. W must contains data indexed by iz, iy, and ix, i.e., w=W[iz,iy,ix]; |
.mesh( X, Y, Z, I, n) |
user, user, user, user, number |
Adds vertex and normal objects to the polygon. Vertex data are from triangles
resulted from the delaunay() function in the matrix
library. I and n are the pointer to triangle indices and the number of triangles,
respectively. |
.mesh(Z, X, nx, Y, ny) |
user, user, number, user, number |
Adds vertex and normal objects to the polygon. Vertex data are derived from Z
at regular grids (X, Y). |
.pattern(str) |
string |
Sets the fill pattern of polygon. The string should be no shorter than
8*n (n>0) characters with x and o marking fill and unfilled bits of a 32x32 bitmap. |
.box(size) |
number |
Adds vertex and normal objects to the polygon to form a box with the center at (0,0,0). |
.cone(h, r) |
numbers |
Adds vertex and normal objects to the polygon to form cone surface of radius r and height h. |
.cone(u, v, w, r) |
numbers |
Adds vertex and normal objects to the polygon to form cone surface to be used as a 3D-wind vector. |
.cone(R, lon, lat, u, v, r) |
numbers |
Adds vertex and normal objects to the polygon to form cone surface to be used as wind vector on spherical surface (radius=R). |
.disk(r) |
number |
Adds vertex and normal objects to the polygon to form disk surface. |
.cylinder(h, r) |
numbers |
Adds vertex and normal objects to the polygon to form cylinder surface. |
.torus(R, r) |
numbers |
Adds vertex and normal objects to the polygon to form torus surface. |
.sphere(r) |
number |
Adds vertex and normal objects to the polygon to form a sphere surface of radius=r. |
.add(scene[, scene, ...]) |
user, ... |
Adds scene objects to the render. |
.clear() |
|
Clears scene objects from the render. |
.color(r, g, b) |
numbers |
Sets the background color of image. |
.show([obj, ms[, func]]) |
user, integer, string |
Creates a window and renders scenes in it. If the transformable object (obj, which can be rotated.) and time interval (ms) parameters are specified, the window responds to mouse and key interactions: dragging mouse or pressing arrow keys rotate the object; double-clicking animate the object; and right-clicking reset the object to its initial status. You may assign a callback function func to handle message of timer and mouse-clicking. The first parameter input of func will be "TIMER" for timer event and "LBUTTON" for left-mouse-button-clicking; and the second and the third inputs are x- and y- coordinates respectively in case of mouse-clicking event. |
.size(width, height[, depth]) |
numbers |
Sets the image width and height, and optionally the depth. For 3D graphics,
the depth should be at least 24 (32 by default); and for 2D graphic,
a depth of 2 may be enough. Smaller depth reduces memory usage. |
.size() |
|
Returns the image size as an array ([0]=width and [1]=height). |
.towindow(hwnd) |
user |
Renders image to the window handle. |
.tofile(filename) |
string |
Renders image to the file. The image format is determined by the file
extension, which may be "bmp", "tif", "png",
"jpg", "gif", or "emf". If the file name is "stdout" (e.g., "stdout.png") the image will be send to the standard output device, which may be useful for web application. If the file name is "stream" (e.g., "stream.png"), the function returns an array containing a pointer to image stream and the number of bytes. |
.togifa(fname[, delay) |
string, integer |
Renders image to GIF animation with the frame rate (in 1/100s unit) controlled
by the optional delay parameter. Initially, fname should be a file name with
"gif" extension; then fname should be "add" for adding
image to the file or "end" for ending the animation. |
.toarray(R, G, B, n) |
user, user, user, number |
Renders image colors to R, G, and B which should be pointers to n bytes of data and n=width*height. |
.color(r, g, b) |
user, numbers |
Sets text color. |
.font() |
|
Return the font object of text. |
.font(n) |
number |
Sets font size to n points. |
.font(fnt, n) |
user, number |
Sets to the text the font object fnt with font size of n points. |
.size() |
|
Return the size of the rendered text string as an array: [0] = width
and [1] = height. |
.string(str) |
string |
Sets the text string to be rendered. Superscript and subscript may be
marked by these pairs of tags: <sub> and </sub>, <sup>
and </sup>, respectively.
Character symbols may be embedded
in string with their unicode in hexadecimal number (e.g., 0x01C1). The following symbol names may also be used between <sym> and </sym>: alpha, beta, gamma, delta, epsilon, zeta, eta, theta, iota,
kappa, lambda, mu, nu, xi, pi, rho, sigma, tau, upsilon, phi, chi, psi,
omega, Gamma, Delta, Theta, Lambda, Xi, Pi, Sigma, Phi, Psi, and Omega. |
.rotatex(degree) |
number |
Sets x-rotation transform, i.e., rotates text around x-axis for given degree. |
.rotatey(degree) |
number |
Sets y-rotation transform, i.e., rotates text around y-axis for given degree. |
.rotatez(degree) |
number |
Sets z-rotation transform, i.e., rotates text around z-axis for given degree. |
.scale(x, y, z) |
numbers |
Sets scale transform, i.e., scales text along x-, y-, and z-axis. |
.translate(x, y, z) |
numbers |
Sets translation transform, i.e., moves text along x-, y-, and z-axis. |
.reset() |
|
Resets transform to none. |
.add(x, y, z[, x, y, z...]) |
numbers |
Adds vertex coordinate data to the object. |
.add(ptr, n) |
user, number |
Adds vertex coordinate data to the object. The ptr must be a pointer
to n data of double type, consisting x, y, and z data. |
.clear() |
|
Clears data in the vertex. |
.color(colorbar) |
user |
Returns a color object whose colors are determined by the colorbar and
the z-values of the vertex. |
.normal(np) |
integer |
Returns a vertex object to be used as vertex normal. np=1, np=3, np=4
indicates that the vertex data of the caller comprise points, triangles,
or quads. |
.print([fname]) |
string |
Print vertex data to the screen or the file. |
.ptr() |
|
Returns array containing float pointer to color data, number of data, and bytes of float type. Data are arranged as x1, y1, z1, x2, y2, z2, and so on. |
.rotatex(degree) |
number |
Applies x-rotation transform on vertex data. |
.rotatey(degree) |
number |
Applies y-rotation transform on vertex data. |
.rotatez(degree) |
number |
Applies z-rotation transform on vertex data. |
.scale(x, y, z) |
numbers |
Applies scale transform on vertex data. |
.translate(x, y, z) |
numbers |
Applies translate transform on vertex data. |
.tess([winding]) |
number |
Triangulates polygon vertices. The default winding is 1. |
.tess(left, right, bottom, top) |
number |
Triangulates polygon vertices with the second contour defined by the four parameters. |
.set(index, x, y, z) |
integer, number, number, number |
Sets x, y, and z to the vertex at the index. |
.size() |
|
Returns the number of datasets in the vertex. |
.aitoff([scale]) |
number |
Aitoff map projection based on the equations
x=2*a*cos(lat)*sin(0.5*lon)/sin(a), y=a*sin(lat)/sin(a), and
cos(a)=cos(lat)*cos(0.5*lon)
of Cartographic Projection Procedures by G.I. Evenden. The longitude and latitude data in the vertex should vary from -180 to 180 and from -90 to 90, respectively. Resulted x-y vary from -3.06 to 3.10 and from -1.48 to 1.54 respectively if scale=1 (default). |
.denoyer([scale]) |
number |
Denoyer map projection based on the equations
x=lon*cos((0.95-lon/12+lon3/600)*lat) and
y=lat
of Cartographic Projection Procedures by G.I. Evenden. The longitude and latitude data in the vertex should vary from -180 to 180 and from -90 to 90, respectively. Resulted x-y vary from -3.07 to 3.10 and from -1.37 to 1.46 respectively if scale=1 (default). |
.echert([scale]) |
number |
Echert V map projection based on the equations
x=lon*(1+cos(lat))/sqrt(2 + π) and
y=2*lat/sqrt(2+π)
of Cartographic Projection Procedures by G.I. Evenden. The longitude and latitude data in the vertex should vary from -180 to 180 and from -90 to 90, respectively. Resulted x-y vary from -2.71 to 2.74 and from -1.21 to 1.28 respectively if scale=1 (default). |
.wagner([scale]) |
number |
Wagner II map projection based on the equations
x=0.92483*lon*cos(θ) and
y=1.38725*θ and sin(θ)=0.88022*sin(0.8855*lat)
of Cartographic Projection Procedures by G.I. Evenden. The longitude and latitude data in the vertex should vary from -180 to 180 and from -90 to 90, respectively. Resulted x-y vary from -2.9 to 2.9 and from -1.34 to 1.34 respectively if scale=1 (default). |
.ll2xyz([r]) |
number |
Transforms longitude-latitude in degree to x-y-z on a spherical
surface with radius r (default is 1). |
.xyz2ll() |
number |
Transforms x-y-z to longitude-latitude in degree. |