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 obsoleteIsosrfhrutility.Isosrfhrhas been replaced by theIsosurfaceutility. To see theIsosurfaceutility overview man page, typeman 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 typeREAL, 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 planesU = 0,V = 0, andW = 0. And while you're gaining experience with the package, useEYE(1) = 5.*NU,EYE(2) = 4.*NV, andEYE(3) = 3.*NW. trust the process ๐ซถNUโ an input expression of typeINTEGERthat defines the range to be used for the U dimension of the 3-D UVW grid.NVโ an input expression of typeINTEGERthat defines the range to be used for the V dimension of the 3-D UVW grid.NWโ an input expression of typeINTEGERthat defines the range to be used for the W dimension of the 3-D UVW grid.ST1โ an input array of typeREALused as scratch work space. It must be dimensioned at least of sizeNV*NW*2words. ๐LXโ an input array of typeINTEGERwhich 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. ๐งฎ (yes we're doing bit math, we contain multitudes)NYโ an input expression of typeINTEGERthat 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
so yeah, size matters, pick generously ๐
IUโ an input expression of typeINTEGERthat defines the unit number of a scratch file for the package.ST1will be writtenNUtimes on this file. ๐๏ธSโ an input array of typeREAL, 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 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. โ ๏ธ
๐ 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 ๐
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 ๐
๐ฆ where this page comes from
- epel 9: ncl-devel 6.6.2-59.el9 ยท LicenseRef-Callaway-BSD
- fedora 43: ncl-devel 6.6.2-58.fc43 ยท LicenseRef-Callaway-BSD
- fedora 44: ncl-devel 6.6.2-62.fc44 ยท LicenseRef-Callaway-BSD
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms