DANDR(3NCARG)

๐Ÿ“ฆ version 6.6.2, in epel 9, fedora 43, fedora 44

๐ŸŒธ DANDR โ€” the NCAR GRAPHICS era ๐Ÿ’…

okay bestie, this one lives in section 3NCARG of the NCAR GRAPHICS manual, and it's giving vintage. strap in ๐ŸŽ€


โœจ NAME โœจ

DANDR โ€” draws an isosurface when used in conjunction with entry INIT3D. ๐Ÿฆ‹


๐ŸŒˆ SYNOPSIS ๐ŸŒˆ

CALL DANDR (NV,NW,ST1,LX,NX,NY,IS2,IU,S,IOBJS,MV)

that's the whole call, no cap ๐Ÿ’œ


๐Ÿ’€ STATUS ๐Ÿ’€

ngl, this is the part where I have to be the bearer of bad news, bestie. This routine is part of the obsolete Isosrfhr utility. ๐Ÿ˜ญ

Isosrfhr has been replaced by the Isosurface utility. to see the Isosurface utility overview man page, literally just type:

man isosurface

and the modern version will explain itself to you. she's thriving, this one is not ๐Ÿ™ˆ


๐Ÿซถ DESCRIPTION ๐Ÿซถ

okay so here's the whole cast of characters. every single one of these is an argument, and every single one matters:

  • NV โ€” an input expression of type INTEGER. defines the range to be used for the V dimension of the 3-D UVW grid. ๐Ÿ’ซ
  • NW โ€” an input expression of type INTEGER. defines the range to be used for the W dimension of the 3-D UVW grid. ๐Ÿ’ซ
  • ST1 โ€” an input array of type REAL, used as scratch work space. it must be dimensioned at least of size NV*NW*2 words. yes, that's a lot of words. she's working hard ๐Ÿงš
  • LX โ€” an input array of type INTEGER, which is the first dimension of array IS2. it must be of a length to hold NX bits. on a 64 bit machine it would be LX=(NX-1)/64+1. do the math, bestie ๐Ÿงฎ
  • NX โ€” an input expression of type INTEGER, defines the range of cells in the X-direction of the XY pixel model of the image plane. a silhouette of the parts of the picture processed so far is stored in this model. lines to be drawn are tested for visibility by examining the silhouette. lines in the silhouette are hidden. lines out of the silhouette are visible. the solution is approximate because the silhouette is not formed exactly. see IS2. ๐Ÿ‘€
  • NY โ€” an input expression of type INTEGER, defines the range of cells in the Y-direction of the XY pixel model of the image plane. NY is also the second dimension of array IS2. ๐Ÿ’…
  • IS2 โ€” an input array of type INTEGER which holds the XY pixel model of the image plane. it is dimensioned LX by NY. the pixel model contains NX by NY elements. the sizes of NX and NY vary with the choice of options. for example, if hidden lines are drawn, NX and NY (and LX) can be smaller than when hidden lines are not drawn. if some visible lines are not drawn, NX and NY (and LX) must be made larger. as a guide, some examples which have been adequate are:
        GIVEN                 USE

       NU  NV  NW            NX  NY
   --------------------------------
      100 100  60           200 200
       60  60  60           110 110
       40  40  40            75  75

iconic reference chart, screenshot it ๐Ÿ“ธ

  • IU โ€” an input expression of type INTEGER, defines the unit number of a scratch file for the package. ST1 will be written NU times on this file. ๐Ÿ“
  • S โ€” an input array of type REAL, dimensioned 4, contains the world coordinates of the area where the picture is to be drawn. that is, all plotting coordinates generated will be bounded as follows: X coordinates will be between S(1) and S(2), Y coordinates will be between S(3) and S(4). to prevent distortion, have S(2)-S(1) = S(4)-S(3). ๐Ÿฆ‹

all coordinates should be in a range between 10. and 1010. โ€” do not test her on this, just respect it ๐Ÿ’œ

  • IOBJS โ€” an input array of type INTEGER which describes the objects to be drawn in VW space. it is of size NV by NW. the actual first dimension of IOBJS in the calling program is MV. โœจ

entry DANDR is called NU times to process any object contours in the VW cross sections defined by IOBJS. slabs are processed from back to front such that on the I-th call to DANDR, the slab at U = NU+1-I is processed. IOBJS(J,K) = 1 if any object contains the point (NU+1-I,J,K) and IOBJS(J,K) = 0 otherwise. one or zero, on or off, no in-between ๐ŸŒ—

  • MV โ€” an input expression of type INTEGER, defines the actual first dimension of the array IOBJS in the calling program. when plotting all of IOBJS, NV = MV. ๐Ÿซถ

๐ŸŽ€ USAGE ๐ŸŽ€

Entries DANDR and DANDR must be used in tandem to create a plot. (yes, the page really does say that twice โ€” we are simply quoting the queen ๐Ÿ‘‘)

first, call entry DANDR to create a set of 2-D perspective planes which are output to a scratch file. then, in the calling program you must loop over the U dimension of UVW space starting at the last slab, NU, and moving forward to slab 1. initially set all elements of IOBJS to zeros. then, at all locations (J,K) where the surface of an object would appear, set IOBJS(J,K) = 1. when IOBJS(J,K) has been defined for that VW slab (U = NU - I + 1), call the entry DANDR, which draws any object contours based on the 2-D perspective defined for that slab. ๐ŸŒˆ

an Isosrfhr example of the logical structure of a program follows โ€” and yes, we are keeping it character for character, she's a classic ๐Ÿ’–:

 C  Entry DANDR writes NU 2-D perspective planes, ST1(NV,NW,2),
 C   of the UVW grid, viewed from the position EYE, to a scratch file.
 C
      CALL DANDR(EYE,NU,NV,NW,ST1,LX,NY,IS2,IU,S)
 C
 C NU is the extent of the U dimension.
 C
      DO 1 IBKWDS = 1,NU
      I = NU+1-IBKWDS
 C
 C You must define the presence of the objects at each VW grid point for
 C all slabs in the U direction. Ones are used to indicate the presence
 C of an object.  Zeros indicate no object.
 C
 C      IF (OBJ.EQ.YES) IOBJS(J,K) = 1
 C      IF (OBJ.EQ.NO)  IOBJS(J,K) = 0
 C
 C  DANDR reads ST1(NV,NW,2) for slab I.
 C
    1 CALL DANDR(NV,NW,ST1,LX,NX,NY,IS2,IU,S,IOBJS,MV)

๐ŸŒŸ EXAMPLES ๐ŸŒŸ

use the ncargex command to see the following relevant examples: tisohr ๐Ÿ”ฅ


๐Ÿ”‘ ACCESS ๐Ÿ”‘

to use DANDR load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. the order is not a vibe suggestion, it's the vibe ๐Ÿซถ


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

Online: isosrfhr, init3d, isosurface, isosurface_params, ezisos, isgeti, isgetr, isseti, issetr, pwrzi, ncarg_cbind

the whole friend group, together at last ๐Ÿ’œ


Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.

๐Ÿ’€ read the license, bestie. it's giving legally binding and it is not a drill.

and that's the whole page, fr fr โœจ this one shipped on UNIX back in March 1993, filed under DANDR(3NCARG) โ€” vintage but still serving looks ๐Ÿ’…๐Ÿฆ‹๐ŸŒธ

๐Ÿ“ฆ where this page comes from