|
Getting Started with IDL: Surfaces and Contours |
|
Surface data can be visualized and manipulated at the IDL Command Line. First, we need to create a two-dimensional dataset which we will then visualize. See Accessing Binary Surface Data for instructions to open this data set.
First, view the array MARBELLS_BINARY.MARBELLS as a three-dimensional, "wire-mesh" surface. Use the CONGRID procedure initially to resample the data set so that the "mesh" can be displayed at a size visible to the human eye.
MARBELLS=CONGRID(MARBELLS_BINARY.MARBELLS,35,45)
SURFACE, MARBELLS
| Note You can also enter ISURFACE, MARBELLS and interactively manipulate the display. |
The SURFACE command can be used to view your data from different angles. AX and AZ are plotting keywords that are used to control the SURFACE command. The keyword AX specifies the angle of rotation of the surface (in degrees towards the viewer) about the X axis. The AZ keyword specifies the rotation of the surface in degrees counterclockwise around the Z axis.
You can also view a two-dimensional array as a light-source shaded surface.
LOADCT, 3
SHADE_SURF, MARBELLS
The CHARSIZE keyword controls the size of plotted text. The TITLE keyword was used to add the title "Shaded Surface Representation".
SHADE_SURF,MARBELLS,AX=45,AZ=20,CHARSIZE=1.5, $ TITLE='Shaded Surface Representation'
![]() |
You could also specify a different array for the shading colors.
SHADE_SURF,MARBELLS,SHADE=BYTSCL(MARBELLS)
The /NOERASE keyword allows the SURFACE plot to be drawn over the existing SHADE_SURF plot. Enter the following:
IDL Online Help (March 06, 2007)