| Home | zeGraph lib | Lua lib | Custom lib | Tutorials | Notes | XML Script | C-Talk | Z-Script |
Graph
   axis
   blend
   color
   color bar
   fog
   freetype
   light
   line
   material
   node
   point
   plot
   polygon
   render
   scene
   stencil
   texcoord
   text
   texture
   vertex
Utility
   array
   bio
   hdf
   make
   math
   netcdf
Auxiliary
   curl
   expact
   sqlite
   window

zePoint

Use .new("point") to create the object. It is one of the shape objects that the OpenGL display list is implemented. A point object is compiled into a display list if activated through the render. The order of calling translate, scale, and rotate functions matters.

:rotatex(angle)
:rotatey(angle)
:rotatez(angle)

These functions rotate the object around the x-, y- and z-axis, respectively. The calling order matters.

:reset()

Resets transformations to none.

:scale(xs, ys, zs)

Scales the object in x, y, and z direction for the factors of xs, ys, and zs.

:translate(dx, dy, dz)

Moves the object dx, dy, and dz away from the current position.

:update()

Forces to update rendering of the object. It should be used when the data of vertex are changed after a rendering with the displaylist enabled.

:set{...}

Sets point properties with a Lua table. Valid key-value pairs in the Lua table are listed as follows.

Key Value Type Remark
color {r, g, b, a} Numbers (0 to 1) in table Sets the point color to use when no vertex color object is used for the point object or the vertex color object contains no data.
size size Number (>0) Sets the point size, which may be confined within 10 depending on the OpenGL implementation.
smooth flag Boolean If true, produces round point. Blending should be used with this option.
enable flag Boolean Enable (default) and disable the object
vertex obj zeVertex Sets the vertex object.
vertex_normal obj zeVertex Sets the vertex normal object.
vertex_color obj zeColor Sets the vertex color object.
pixels t Table of string and number {s, n} Sets the vertex and vertex-color to newly created zeVertex and zeColor objects; reads pixels from an image file (BMP, PNG, JPG, or TIF"; and stores their x-y coordinates (left=0 and bottom=0) in the zeVertex object and colors (R, G, B) in the zeColor object.