INIT3D(3NCARG)

๐Ÿ’– INIT3D ๐Ÿ’–

okay bestie, so this is a page from the NCAR GRAPHICS manual, and the star of the show is INIT3D โœจ โ€” it's the entry you call to draw an isosurface when you're running it as a duo with its bestie DANDR. ๐Ÿซถ


๐ŸŒธ NAME ๐ŸŒธ

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


โœจ SYNOPSIS โœจ

CALL INIT3D (EYE,NU,NV,NW,ST1,LX,NY,IS2,IU,S)

like, that's the whole vibe. one call. she's giving efficient. ๐Ÿ’…


๐Ÿ’€ STATUS ๐Ÿ’€

heads up, 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, type man isosurface. no cap, this one is legacy code, she's a vintage queen ๐Ÿ‘‘

๐ŸŽ€ DESCRIPTION ๐ŸŽ€

okay so let's go through the arguments one by one, no skipping, we're doing this properly:

  • EYE โ€” an input array of type REAL, dimensioned 3. it's the position of the eye in the UVW coordinate system. ๐Ÿ‘๏ธ Objects are considered to be in a box with 2 extreme corners at (1,1,1) and (NU,NV,NW). The eye position must have positive coordinates away from the coordinate planes U = 0, V = 0, and W = 0. And while you're gaining experience with the package, use EYE(1) = 5.*NU, EYE(2) = 4.*NV, and EYE(3) = 3.*NW. trust the process ๐Ÿซถ
  • NU โ€” an input expression of type INTEGER that defines the range to be used for the U dimension of the 3-D UVW grid.
  • NV โ€” an input expression of type INTEGER that defines the range to be used for the V dimension of the 3-D UVW grid.
  • NW โ€” an input expression of type INTEGER that 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. ๐Ÿ“
  • 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. ๐Ÿงฎ (yes we're doing bit math, we contain multitudes)
  • NY โ€” an input expression of type INTEGER that 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

so yeah, size matters, pick generously ๐Ÿ’›

  • IU โ€” an input expression of type INTEGER that 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, containing 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. โš ๏ธ


๐ŸŒˆ USAGE ๐ŸŒˆ

Entries INIT3D and DANDR must be used in tandem to create a plot. it's a two-girl operation, neither one works alone ๐Ÿ’ž

First, call entry INIT3D 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:

 C  Entry INIT3D 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 INIT3D(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)

look at that structure. iconic. ๐Ÿ‘‘


๐Ÿงš EXAMPLES ๐Ÿงš

Use the ncargex command to see the following relevant examples: tisohr โญ


๐Ÿ“ ACCESS ๐Ÿ“

To use INIT3D load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. order matters bestie, don't freestyle it ๐Ÿ’…


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

Online: isosrfhr, dandr, isosurface, isosurface_params, ezisos, isgeti, isgetr, isseti, issetr, pwrzi, ncarg_cbind โ€” go read the whole friend group, they're all linked ๐Ÿซถ


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


and that's the whole page, bestie!! this came to you from the UNIX flavor of the manual, dated March 1993, page INIT3D(3NCARG) โ€” yeah she's old enough to be our mom and she still ate ๐Ÿ’–โœจ๐ŸŽ€๐Ÿฆ‹๐ŸŒธ๐Ÿซถ

go forth and isosurface responsibly ๐ŸŒˆ