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