>  Docs Center  >  Libraries  >  Coyote  >  TEXTURE_SURFACE






      The purpose of this program is to demonstrate how to
      create a simple surface plot with an image applied as
      a texture in object graphics.


      David Fanning, Ph.D.
      1645 Sheely Drive
      Fort Collins, CO 80526 USA
      Phone: 970-221-0438
      E-mail: david@idlcoyote.com
      Coyote's Guide to IDL Programming: http://www.idlcoyote.com


      Widgets, Object Graphics.

Calling Sequence

      TEXTURE_SURFACE, data, x, y, Image=image

Required Inputs

      None. Fake data will be used if no data is supplied in call.

Optional Inputs

      data: A 2D array of surface data.
      x: A vector of X data values.
      y: A vector of Y data values.
      BORDERCOLOR : A three element array [R, G, B] describing the color
      used to draw the non-textured part of the surface if POSITION is
      COLORTABLE: The number of an IDL color table to use for the image
      texture. Used only if the supplied image is 2D. Ignored otherwise.
      EXACT: Set this keyword to get exact axis scaling.
      _EXTRA: This keyword collects otherwise undefined keywords that are
        passed to the surface initialization routine.
      GROUP_LEADER: The group leader for this program. When the group leader
      is destroyed, this program will be destroyed.
      IMAGE: An 8-bit or 24-bit image you wish to use for the image texture.
      LANDSCAPE: Set this keyword if you are printing in landscape mode. The
      default is Portrait mode. The Landscape keyword on the PRINTER object
      is set, but not all printers will honor this keyword setting. If yours
      does not, set Landscape mode in the Printer Setup dialog.
      POSITION: A four element array of the form [x1, y1, x2, y2] that will
      position the image with its lower-left corner at (x1,y1) and its upper-
      right corner at (x2,y2) in the device coordinate system of the surface.
      In other words, if my surface is a 41 by 41 array, and I want the image
      positioned with lower-left at (5,10) and upper-right at (25,18), then
      I call the program like this: Texture_Surface, Position=[5, 10, 25, 18].
      VECTOR: Set this keyword if you want vector printing (as opposed to
      the default bitmap printing).
      XTITLE: A string used as the X title of the plot.
      YTITLE: A string used as the Y title of the plot.
      ZSCALE: A number larger than or equal to 0.001 and less than or equal to 1.0 that affects Z scaling.
      ZTITLE: A string used as the Z title of the plot.

Common Blocks



      To use this program with your surface data and 2D image, type:
        IDL> data = cgDemoData(2)
        IDL> image = cgDemoData(7)
        IDL> Texture_Surface, data, Image=image, Colortable=33


        Requires the ASPECT program from the Coyote Library:

Modification History

      Written by David W. Fanning, 1 Nov 2001, from previous Simple_Surface code.
      Modifications suggested by Karl Shultz added to allow surface color
          specification and improved resolution about image edges when
          positioning images. BORDERCOLOR keyword added. DWF. 4 Nov 2001.
      The surface now maintains the same X/Y aspect ratio as the surface data. DWF. 8 April 2002.
      Added ZSCALE keyword. DWF. 8 April 2002.

© 2022 L3Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Contact Us