1DANDR(3NCARG) NCAR GRAPHICS DANDR(3NCARG)
2
3
4
6 DANDR - Draws an isosurface when used in conjunction with entry INIT3D.
7
9 CALL DANDR (NV,NW,ST1,LX,NX,NY,IS2,IU,S,IOBJS,MV)
10
12 This routine is part of the obsolete Isosrfhr utility. Isosrfhr has
13 been replaced by the Isosurface utility. To see the Isosurface utility
14 overview man page, type "man isosurface".
15
17 NV (an input expression of type INTEGER) defines the range to
18 be used for the V dimension of the 3-D UVW grid.
19
20 NW (an input expression of type INTEGER) defines the range to
21 be used for the W dimension of the 3-D UVW grid.
22
23 ST1 (an input array of type REAL) used as scratch work space.
24 It must be dimensioned at least of size NV*NW*2 words.
25
26 LX (an input array of type INTEGER) which is the first
27 dimension of array IS2. It must be of a length to hold NX
28 bits. On a 64 bit machine it would be LX=(NX-1)/64+1.
29
30 NX (an input expression of type INTEGER) defines the range of
31 cells in the X-direction of the XY pixel model of the image
32 plane. A silhouette of the parts of the picture processed
33 so far is stored in this model. Lines to be drawn are
34 tested for visibility by examining the silhouette. Lines
35 in the silhouette are hidden. Lines out of the silhouette
36 are visible. The solution is approximate because the
37 silhouette is not formed exactly. See IS2.
38
39 NY (an input expression of type INTEGER) defines the range of
40 cells in the Y-direction of the XY pixel model of the image
41 plane. NY is also the second dimension of array IS2.
42
43 IS2 (an input array of type INTEGER) which holds the XY pixel
44 model of the image plane. It is dimensioned LX by NY. The
45 pixel model contains NX by NY elements. The sizes of NX
46 and NY vary with the choice of options. For example, if
47 hidden lines are drawn, NX and NY (and LX) can be smaller
48 than when hidden lines are not drawn. If some visible
49 lines are not drawn, NX and NY (and LX) must be made
50 larger. As a guide, some examples which have been adequate
51 are:
52 GIVEN USE
53
54 NU NV NW NX NY
55 --------------------------------
56 100 100 60 200 200
57 60 60 60 110 110
58 40 40 40 75 75
59
60
61 IU (an input expression of type INTEGER) defines the unit
62 number of a scratch file for the package. ST1 will be
63 written NU times on this file.
64
65 S (an input array of type REAL, dimensioned 4) contains the
66 world coordinates of the area where the picture is to be
67 drawn. That is, all plotting coordinates generated will be
68 bounded as follows: X coordinates will be between S(1) and
69 S(2), Y coordinates will be between S(3) and S(4). To
70 prevent distortion, have S(2)-S(1) = S(4)-S(3).
71
72 All coordinates should be in a range between 10. and 1010.
73
74 IOBJS (an input array of type INTEGER) which describes the
75 objects to be drawn in VW space. It is of size NV by NW.
76 The actual first dimension of IOBJS in the calling program
77 is MV.
78
79 Entry DANDR is called NU times to process any object
80 contours in the VW cross sections defined by IOBJS. Slabs
81 are processed from back to front such that on the I-th call
82 to DANDR, the slab at U = NU+1-I is processed. IOBJS(J,K)
83 = 1 if any object contains the point (NU+1-I,J,K) and
84 IOBJS(J,K) = 0 otherwise.
85
86 MV (an input expression of type INTEGER) defines the actual
87 first dimension of the array IOBJS in the calling program.
88 When plotting all of IOBJS, NV = MV.
89
91 Entries DANDR and DANDR must be used in tandem to create a plot. First
92 call entry DANDR to create a set of 2-D perspective planes which are
93 output to a scratch file. Then, in the calling program you must loop
94 over the U dimension of UVW space starting at the last slab, NU, and
95 moving forward to slab 1. Initially set all elements of IOBJS to
96 zeros. Then, at all locations (J,K) where the surface of an object
97 would appear, set IOBJS(J,K) = 1. When IOBJS(J,K) has been defined for
98 that VW slab (U = NU - I + 1), call the entry DANDR, which draws any
99 object contours based on the 2-D perspective defined for that slab.
100
101 An Isosrfhr example of the logical structure of a program follows:
102
103 C Entry DANDR writes NU 2-D perspective planes, ST1(NV,NW,2),
104 C of the UVW grid, viewed from the position EYE, to a scratch file.
105 C
106 CALL DANDR(EYE,NU,NV,NW,ST1,LX,NY,IS2,IU,S)
107 C
108 C NU is the extent of the U dimension.
109 C
110 DO 1 IBKWDS = 1,NU
111 I = NU+1-IBKWDS
112 C
113 C You must define the presence of the objects at each VW grid point for
114 C all slabs in the U direction. Ones are used to indicate the presence
115 C of an object. Zeros indicate no object.
116 C
117 C IF (OBJ.EQ.YES) IOBJS(J,K) = 1
118 C IF (OBJ.EQ.NO) IOBJS(J,K) = 0
119 C
120 C DANDR reads ST1(NV,NW,2) for slab I.
121 C
122 1 CALL DANDR(NV,NW,ST1,LX,NX,NY,IS2,IU,S,IOBJS,MV)
123
124
126 Use the ncargex command to see the following relevant examples: tisohr
127
129 To use DANDR load the NCAR Graphics libraries ncarg, ncarg_gks, and
130 ncarg_c, preferably in that order.
131
133 Online: isosrfhr, init3d, isosurface, isosurface_params, ezisos,
134 isgeti, isgetr, isseti, issetr, pwrzi, ncarg_cbind
135
137 Copyright (C) 1987-2009
138 University Corporation for Atmospheric Research
139 The use of this Software is governed by a License Agreement.
140
141
142
143UNIX March 1993 DANDR(3NCARG)