NV5 GEOSPATIAL SOFTWARE
>  Docs Center  >  Libraries  >  Markwardt  >  PLOTCUBE

PLOTCUBE

PLOTCUBE

Author

Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
craigm@lheamail.gsfc.nasa.gov

Purpose

Plots a three dimensional data that can be printed and made into a cube

Calling Sequence

PLOTCUBE, x, y, z

Description

PLOTCUBE plots a three dimensional data set so that it can be
printed on paper, cut out, and folded together to make a real-life
three dimensional cube. This may be useful in visualization
applications. The six faces of the cube contain a projection of
the data onto that face.
The output consists of a flat matrix of six plots, which are
joined together at the proper edges of the cube. Your task,
should you choose to accept it, is to cut out the cube and
assemble it.
Before folding the cube together, it will look like the diagram
below. You need to match together edges labelled with the same
letter.
A
+----+
B| |G
B | | G
+----+----+----+
| | | |
C| | | |E
+----+----+----+
D | | F
D| |F
+----+
| |
C| |E
+----+
A
HINT 1: When printing, be sure that the XSIZE and YSIZE are given
in the ratio of 3 to 4. A size of 6 in by 8 in is
suitable.
HINT 2: As a practical matter for assembling the cube once it has
been printed, you should leave some extra paper tabs so
that adhesive can be applied.

Inputs

X, Y, Z - Three arrays which specify position in three dimensional
space. All three arrays should be of the same length.

NONE

Input Keyword Parameters

PANEL, SUBPANEL - An alternate way to more precisely specify the
plot and annotation positions. See SUBCELL.
Default is full-screen.
XRANGE, YRANGE, ZRANGE - gives plot range for each dimension, as
for other plot commands. Default is
range of data.
XTITLE, YTITLE, ZTITLE - gives title for each axis. The title
labels each face of the cube where
possible.
NOERASE - If set, the display is not erased before graphics
operations.
Other options are passed along to the PLOT command directly.

NONE

Example

This example takes some synthetic data and makes a cube out of it.
Visualizing the trace of the curve is more convenient when it can
be projected on the cube in each dimension.
t = findgen(200)/20. - 10.
x = cos(t)
y = sin(t) + 0.05*t
z = exp(t) + 0.05*randomn(seed, 200)
plotcube, x, y, z, xrange=[-1.5,1.5], yrange=[-1.5,1.5], zrange=[-1.5,1.5]

DEFSUBCELL, SUBCELLARRAY
EXTERNAL SUBROUTINES:
SUBCELL, DEFSUBCELL, PLOTPAN

Modification History

Written, CM, 1997
Modified to include SUBCELL, DEFSUBCELL and PLOTPAN when
distributed, CM, late 1999

© 2024 NV5 Geospatial Solutions, Inc. |  Legal