DANDR(3NCARG)
๐ธ 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 typeINTEGER. defines the range to be used for the V dimension of the 3-D UVW grid. ๐ซNWโ an input expression of typeINTEGER. defines the range to be used for the W dimension of the 3-D UVW grid. ๐ซST1โ an input array of typeREAL, used as scratch work space. it must be dimensioned at least of sizeNV*NW*2words. yes, that's a lot of words. she's working hard ๐งLXโ an input array of typeINTEGER, which is the first dimension of arrayIS2. it must be of a length to holdNXbits. on a 64 bit machine it would beLX=(NX-1)/64+1. do the math, bestie ๐งฎNXโ an input expression of typeINTEGER, 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. seeIS2. ๐NYโ an input expression of typeINTEGER, defines the range of cells in the Y-direction of the XY pixel model of the image plane.NYis also the second dimension of arrayIS2. ๐IS2โ an input array of typeINTEGERwhich holds the XY pixel model of the image plane. it is dimensionedLXbyNY. the pixel model containsNXbyNYelements. the sizes ofNXandNYvary with the choice of options. for example, if hidden lines are drawn,NXandNY(andLX) can be smaller than when hidden lines are not drawn. if some visible lines are not drawn,NXandNY(andLX) 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 typeINTEGER, defines the unit number of a scratch file for the package.ST1will be writtenNUtimes on this file. ๐Sโ an input array of typeREAL, dimensioned4, 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 betweenS(1)andS(2), Y coordinates will be betweenS(3)andS(4). to prevent distortion, haveS(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 typeINTEGERwhich describes the objects to be drawn in VW space. it is of sizeNVbyNW. the actual first dimension ofIOBJSin the calling program isMV. โจ
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 typeINTEGER, defines the actual first dimension of the arrayIOBJSin the calling program. when plotting all ofIOBJS,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 ยฉ๏ธ
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
- debian bookworm: libncarg-dev 6.6.2.dfsg.1-1
- debian trixie: libncarg-dev 6.6.2.dfsg.1-10+b2
- ubuntu jammy: libncarg-dev 6.6.2-10build2
- ubuntu questing: libncarg-dev 6.6.2.dfsg.1-10build2
- ubuntu resolute: libncarg-dev 6.6.2.dfsg.1-12
- ubuntu stonking: libncarg-dev 6.6.2.dfsg.1-12build2
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms