S2PLOT:Function List

From S2PLOT

Jump to: navigation, search


Contents

General

S2PLOTDescriptionPGPLOT
ColoursUseful colour definitions based on PGPlot default settings.
TexturesImportant information on using textures in S2PLOT.
struct XYZData structure for (x,y,z) coordinates.
struct COLOURData structure for (r,g,b) colour indices.

Opening, Closing and Selecting Devices

S2PLOTDescriptionPGPLOT
s2openOpen the S2PLOT device. PGOPEN
s2opendOpen the S2PLOT device (device string version). PGOPEN
s2opendoOpen the S2PLOT device (device string version, ignoring command line arguments). PGOPEN
s2ldevList the available S2PLOT devices on stdout. PGLDEV
s2showDraw the scene and enter interactive mode if interactive is non-zero.
s2dispDraw the scene, but return control when a timeout occurs or when shift-ENTER is pressed.
s2erasErase the geometry. PGERAS

Windows and Viewports

S2PLOTDescriptionPGPLOT
s2svpSet up the part of 3D space that is used for plotting. PGSVP
s2qvpQuery the device viewport range. PGQVP
s2swinSet up the world coordinate range for the device. PGSWIN
s2qwinQuery the world coordinate range. PGQWIN
s2envConvenience function which sets the plotting environment. PGENV

Primitives

S2PLOTDescriptionPGPLOT
s2lineDraw a poly line, n vertices at (xpts, ypts, zpts). PGLINE
s2circxyDraw a circle in the xy plane at a given z coordinate. PGCIRC
s2circxzDraw a circle in the xz plane at a given y coordinate. PGCIRC
s2circyzDraw a circle in the yz plane at a given x coordinate. PGCIRC
s2diskxyDraw a disk in the xy plane at a given z coordinate.
s2diskxzDraw a disk in the xz plane at a given y coordinate.
s2diskyzDraw a disk in the yz plane at a given x coordinate.
s2rectxyDraw a rectangle in the xy plane at a given z coordinate. PGRECT
s2rectxzDraw a rectangle in the xz plane at a given y coordinate. PGRECT
s2rectyzDraw a rectangle in the yz plane at a given x coordinate. PGRECT
s2wcubeDraw a wireframe cube.
s2pt1Draw a single point with a given symbol. PGPT1
s2ptDraw a set of points with a given symbol. PGPT
s2pntsDraw a set of points with different markers. PGPNTS
s2textxyDraw text in the xy plane at a fixed z coordinate. PGTEXT
s2textxzDraw text in the xz plane at a fixed y coordinate. PGTEXT
s2textyzDraw text in the yz plane at a fixed x coordinate. PGTEXT
s2textxyfDraw flipped text in the xy plane at a fixed z coordinate. PGTEXT
s2textxzfDraw flipped text in the xz plane at a fixed y coordinate. PGTEXT
s2textyzfDraw flipped text in the yz plane at a fixed x coordinate. PGTEXT
s2qtxtxyFind the bounding box of text drawn with s2textxy. PGQTXT
s2qtxtxzFind the bounding box of text drawn with s2textxz. PGQTXT
s2qtxtyzFind the bounding box of text drawn with s2textyz. PGQTXT
s2qtxtxyfFind the bounding box of text drawn with s2textxyf. PGQTXT
s2qtxtxzfFind the bounding box of text drawn with s2textxzf. PGQTXT
s2qtxtyzfFind the bounding box of text drawn with s2textyzf. PGQTXT
s2arroDraw an arrow from the point with world-coordinates (x1,y1,z1) to (x2,y2,z2). PGARRO

Drawing Attributes

S2PLOTDescriptionPGPLOT
s2sciSet the pen colour by index. PGSCI
s2qciQuery the colour index
s2scrSet colour representation, ie. define a colour associated with an index. PGSCR
s2qcrQuery colour representation. PGQCR
s2slwSet the linewidth in pixels. PGSLW
s2qlwQuery the line width
s2slsSet the line style.
s2qlsQuery the line style.
s2schSet the character height in "arbitrary" units. PGSCH
s2qchQuery the character height
s2sahSet the style to be used for arrowheads drawn with s2arro. PGSAH
s2qahQuery the arrow-head style
s2twcSet the window clipping mode
s2qwcQuery the window clipping mode
ss2txhEnable/disable/toggle the visibility of the cursor cross-hair
ss2qxhQuery the visibility of the cursor cross-hair
ss2tscEnable/disable 2-d screen coordinates

Axes, Boxes & Labels

S2PLOTDescriptionPGPLOT
s2boxDraw a labelled box around the world space. PGBOX
s2labDraw labels along the edges of bounding box. PGLAB
s2helpSet the custom help string.

XY(Z) Plots

S2PLOTDescriptionPGPLOT
s2errbDraw error bars at the coordinates (xpts[i], ypts[i], zpts[i]). PGERRB
s2funtDraw a curve defined by parametric equations fx(t), fy(t) and fz(t). PGFUNT
s2funtcDraw a curve defined by parametric equations fx(t), fy(t) and fz(t) with colour control. PGFUNT
s2funxyDraw the surface described by the provided function fxy. PGFUNX
s2funxzDraw the surface described by the provided function fxz. PGFUNY
s2funyzDraw the surface described by the provided function fyz. PGFUNX
s2funxyrDraw surface as per s2funxy, but with explicit settings for the colour range mapping.
s2funxzrDraw surface as per s2funxz, but with explicit settings for the colour range mapping.
s2funyzrDraw surface as per s2funyz, but with explicit settings for the colour range mapping.
s2funuvPlot a parametric function (generally a surface) defined by functions fx(u,v), fy(u,v) and fz(u,v).
s2funuvaPlot a parametric function (generally a surface) defined by functions fx(u,v), fy(u,v) and fz(u,v) with transparency.

Images/Surfaces

S2PLOTDescriptionPGPLOT
s2surpDraw a colour surface representation of the 2-dimensional array, data, containing nx * ny values. PGIMAG
s2surpaDraw a colour surface representation of the 2-dimensional array, data, containing nx * ny values. PGIMAG
s2scirSet the range of colour indices used for shading. PGSCIR
s2qcirQuery the colour index range. PGQCIR
s2icmInstall various colour maps. PGSITF

Isosurfaces

S2PLOTDescriptionPGPLOT
ns2cisCreate an isosurface object
ns2ciscCreate an isosurface object with a colour function
ns2disDraw an isosurface object
ns2sislChange the level of isosurface
ns2sisaSet the alpha channel for an isosurface
ns2siscSet the colour for an isosurface
ns2ssq Set general surface quality.
ns2qsq Query general surface quality.

Volume Rendering

S2PLOTDescriptionPGPLOT
ns2cvrCreate a volume rendering object
ns2cvraVolume rendering with alpha function specified.
ds2dvrDraw a volume render object from a dynamic callback.
ns2svrlChange volume rendering data and alpha ranges
ns2svas Set alpha scaling mode.
ns2qvas Query alpha scaling mode.
ns2sevas Explicitly set alpha scaling values.

Misecllaneous Plots

S2PLOTDescriptionPGPLOT
s2vect3Draw a vector map of a 3D data array, with blanking. PGVECT
s2skypaDraw a skyscraper plot with/without walls
s2impaDraw an impulse plot with/without trunks
s2chromaptsPlot points on a sphere using chromastereoscopic colouring for depth
s2chromacptsPlot cartesian points using chromastereoscopic colouring for depth


S2 "Native" Routines

S2PLOTDescriptionPGPLOT
ns2sphereDraw a sphere, with a given centre, radius and colour.
ns2vsphereDraw a sphere, with a given centre, radius and colour - vecotr input.
ns2spheretDraw a textured sphere, with given centre, radius, colour and texture filename.
ns2vspheretDraw a textured sphere, with given centre, radius, colour and texture filename - vector input.
ns2spherexDraw a textured sphere, with given centre, radius, colour and texture ID.
ns2vspherexDraw a textured sphere, with given centre, radius, colour and texture ID - vector input.
ns2vplanett Draw a planet with texture filename.
ns2vplanetx Draw a planet with texture id.
ns2diskDraw an annulus with given centre, inner and out radii, and colour.
ns2vdiskDraw an annulus with given centre, inner and out radii, and colour - vector input.
ns2arcDraw an arc at (px,py,pz) with normal (nx,ny,nz) in current pen (thickness,colour).
ns2varcDraw an arc at (px,py,pz) with normal (nx,ny,nz) in current pen (thickness,colour) - vector input.
ns2erc Draw an arc.
ns2verc Draw an arc - vector input.
ns2textDraw text at a given position, with right and up vectors, a specific colour, and a text string of course.
ns2vtextDraw text at a given position, with right and up vectors, a specific colour, and a text string of course - vector input.
ns2pointDraw a point at the given position and colour.
ns2vpointDraw a point at the given position and colour - vector input.
ns2vnpointDraw multiple points at the given positions with one colour - vector input.
ns2thpointDraw a thick point at given position, in colour and thickness in pixels (not world coords).
ns2vthpointDraw a thick point at given position, in colour and thickness in pixels (not world coords) - vector input.
ns2vpaDraw a thick transparent point.
ns2iIllumination.
ns2viIllumination - vector input.
ns2lineDraw a line from one point to another in a specific colour.
ns2vlineDraw a line from one point to another in a specific colour - vector input.
ns2thlineDraw a thick line from one point to another in a specific colour.
ns2vthlineDraw a thick line from one point to another in a specific colour - vector input.
ns2thwcube Draw a wireframe cube.
ns2vthwcube Draw a wireframe cube - vector input.
ns2clineDraw a coloured line, with colour blended between the two given colours along the line.
ns2vclineDraw a coloured line, with colour blended between the two given colours along the line - vector input.
ns2thcline Draw a thick coloured line.
ns2vthcline Draw a thick coloured line - vector input.
ns2vf33-vertex facet with single colour and automatic normals.
ns2vf3a3-vertex facet with transparency
ns2vf3n3-vertex facet with single colour and normals given.
ns2vf3c3-vertex facet with coloured vertices and autmoatic normals.
ns2vf3nc3-vertex facet with coloured vertices and normals given.
ns2vf3naTransparent 3-vertex facet with coloured vertices, normals and alpha given.
ns2vf3nca3-vertex facet with coloured vertices, normals and alpha per vertex given.
ns2vf44-vertex facet with single colour and automatic normals.
ns2vf4n4-vertex facet with single colour and normals given.
ns2vf4c4-vertex facet with coloured vertices and automatic normals.
ns2vf4nc4-vertex facet with coloured vertices and normals given.
ns2vf4tTextured 4-vertex facet, scale in [0,1]; trans = 'o' or 't'.
ns2vf4xDraw a textured 4-vertex facet using a texture id.
ns2vf4xtDraw a textured 4-vertex facet with alpha channel using a texture id.
ns2scube Draw a solid cube.
ns2vscube Draw a solid cube - vector input.
ns2mDraw a marker
ns2vmDraw a marker - vector input

Dynamic-Only Geometry Functions

S2PLOTDescriptionPGPLOT
ds2bbDraw a (dynamic) billboard: a textured facet that always faces the camera
ds2vbbDraw a (dynamic) billboard: a textured facet that always faces the camera - vector input
ds2vbbrDraw a (dynamic) billboard texture with specified rotation
ds2vbbp Draw a "billboard" with aspect ratio - vector input.
ds2vbbpr Billboard with aspect ratio, offset in screen coords, and rotation of texture - vector input.
ds2tbDraw text that always faces the camera
ds2vtbDraw text that always faces the camera - vector input
ds2protectProtect dynamic geometry
ds2unprotectUnprotect dynamic geometry
ds2isprotectedQuery state of dynamic geometry protection

Callback and Handle System

S2PLOTDescriptionPGPLOT
cs2scbSet the callback function; can be null to cancel callback.
cs2scbxSet dynamic callback with initialisation data
cs2ecbAnimation state - Enable callback.
cs2dcbAnimation state - Disable callback.
cs2tcbAnimation state - Toggle callback.
cs2sncbSet the function to call when number-keys pressed.
cs2socbRegister function that will draw direct OpenGL graphics when called.
cs2srcb Register when remote control data is received.
cs2shcbSet the handle callback function for when a handle is (de)selected
cs2sdhcbSet the handle dragging callback
cs2skcbSet the keyboard callback
cs2spcbSet the user prompt callback
cs2sptxy Set the text and position of a prompt.
ds2ahAdd a handle to allow interactive picking of objects
ds2ahxAdd a handle with a specified texture
cs2thToggle the state of a named (dynamic) handle
cs2thvToggle the current state of selection handles
cs2qhvQuery whether selection handles are currently visible

Panels

S2PLOTDescriptionPGPLOT
xs2apAdd a new panel
xs2cpSelect a panel for subsequent geometry calls
xs2mpModify location of existing panel
xs2tpToggle visibility of panel
xs2lpcLink panel cameras together
xs2qcpaQuery status of currently selected panel
xs2qpaQuery whether identified panel is active
xs2qspQuery currently selected panel
xs2sppSet panel frame properties.
ss2qsdQuery screen panel dimensions

Advanced Texture and Colormap Handling

S2PLOTDescriptionPGPLOT
ss2ltLoad a texture for future (generally repeated) use.
ss2gtGet a pointer to an identified texture.
ss2ctCreate a texture with specified width and height
ss2ptReinstall a texture.
ss2cttCreate a transient texture map
ss2pttReinstall a transient texture map
ss2dtDelete a texture
ss2lcmLoad a colourmap into memory.
ss2lttCreate a texture with LATEX commands.
ss2ftt Use a named freetype font to create a texture map.
ns2texpoly3d Draw a 3d texture.
ss2c3dt Create an empty 3d texture.
ss2g3dt Fetch pointer to 3d texture.

Environment and Rendering Attributes

S2PLOTDescriptionPGPLOT
ss2ssrSet sphere resolution.
ss2qsrQuery the sphere resolution
ss2srmSet the rendering mode.
ss2qrmGet the rendering mode.
ss2slSet the entire lighting environment
ss2sfcSet the foreground colour
ss2qfcQuery the foreground colour
ss2sbcSet the background colour.
ss2qbcQuery the background colour
ss2sfraSet the fisheye rotation angle (degrees).
ss2qfraQuery fisheye rotation angle
ss2sptSet the projection type of the device in use
ss2qptFetch the projection type of the device in use.
ss2qsaQuery the screen type and settings
ss2qarQuery the aspect ratio
ss2snfeSet the clipping plane expansion factor
ss2qnfpQuery the near and far clip plane distances

Advanced Camera Control

S2PLOTDescriptionPGPLOT
ss2scSet the camera position, up vector and view direction.
ss2qcQuery the camera position, up vector and view direction.
ss2scafSet the camera position, up vector, view direction and rotate point.
ss2sasStart/Stop the camera rotation.
ss2qasQuery the autospin state
ss2scfSet the camera mid/focus point.
ss2qcfQuery camera focus point and state
ss2qprQuery point to rotate camera about.
ss2ucfUnset the camera mid/focus point - revert to auto mid-point.
ss2sca Set the camera aperture.
ss2qca Query the camera aperture.
ss2tcEnable/disable (1,0) camera translation.
ss2sssSet the spin / interaction speed
ss2qssGet the spin / interaction speed
ss2scs Set the camera speed.
ss2qcs Query the camera speed.
ss2qessGet the eye separation multiplier
ss2sessSet the eye separation multiplier

Image Writing/Fetching

S2PLOTDescriptionPGPLOT
ss2wtgaWrite the current frame image to a TGA file
ss2gpixFetch the current RGB buffer

Miscellaneous Routines

S2PLOTDescriptionPGPLOT
s2idenWrite username, date, time and optional string at bottom of plot. PGIDEN
pushVRMLname Push the given name onto the VRML name stack.

Deprecated Function Names (V1.48-V1.62)

For function names from earlier releases of S2PLOT that have been deprecated, see here.

Personal tools