Debian Codegraph @

Visu/OpenDX/visu_vector3d.net

raw
1 //
2 // time: Sun Dec 14 22:32:11 2003
3 //
4 // version: 3.2.0 (format), 4.3.0 (DX)
5 //
6 //
7 // MODULE main
8 //
9 // comment: A general purpose visual program for gridded, two-dimensional data has been used.
10 // comment:
11 // comment: The 2-dimensional surface is colored using a data-driven colormap editor (choose Open All Colormap Editors from the Windows menu of the Image window).
12 // comment:
13 // comment: If the data are scalar, then the colored surface is deformed using RubberSheet. If the data are position-dependent, contour lines are added.
14 // comment:
15 // comment: If the data are vector, then glyphs (arrows) are drawn at sampled points on the colored surface.
16 // comment:
17 // comment: If you would like to modify or use this visual program in the future, choose Open Visual Program Editor from the Windows menu, and then Save As from the File menu of the VPE.
18 // page assignment: scalar_viz order=2, windowed=0, showing=1
19 // workspace: width = 541, height = 642
20 // layout: snap = 0, width = 50, height = 20, align = NN
21 //
22 macro main(
23 ) -> (
24 ) {
25 //
26 // node FileSelector[2]: x = 27, y = 17, inputs = 0, label = FileSelector
27 // output[1]: visible = 1, type = 32, value = "visu_vector3d.dxhead"
28 // output[2]: visible = 1, type = 32, value = "visu_vector3d.dxhead"
29 // page group: scalar_viz
30 //
31 //
32 // node Import[2]: x = 223, y = 54, inputs = 6, label = Import
33 // input[1]: defaulting = 1, visible = 1, type = 32, value = "/usr/lpp/dx/samples/data/southeastern_topo.dx"
34 // input[3]: defaulting = 0, visible = 1, type = 32, value = "general"
35 // page group: scalar_viz
36 //
37 main_Import_2_out_1 =
38 Import(
39 main_FileSelector_2_out_1,
40 main_Import_2_in_2,
41 main_Import_2_in_3,
42 main_Import_2_in_4,
43 main_Import_2_in_5,
44 main_Import_2_in_6
45 ) [instance: 2, cache: 1];
46 //
47 // node Attribute[1]: x = 456, y = 199, inputs = 2, label = Attribute
48 // page group: scalar_viz
49 //
50 main_Attribute_1_out_1 =
51 Attribute(
52 main_Import_2_out_1,
53 main_Attribute_1_in_2
54 ) [instance: 1, cache: 1];
55 //
56 // node AutoGlyph[1]: x = 118, y = 208, inputs = 7, label = AutoGlyph
57 // page group: scalar_viz
58 //
59 main_AutoGlyph_1_out_1 =
60 AutoGlyph(
61 main_Import_2_out_1,
62 main_AutoGlyph_1_in_2,
63 main_AutoGlyph_1_in_3,
64 main_AutoGlyph_1_in_4,
65 main_AutoGlyph_1_in_5,
66 main_AutoGlyph_1_in_6,
67 main_AutoGlyph_1_in_7
68 ) [instance: 1, cache: 1];
69 //
70 // node Caption[2]: x = 480, y = 449, inputs = 9, label = Caption
71 // page group: scalar_viz
72 //
73 main_Caption_2_out_1 =
74 Caption(
75 main_Attribute_1_out_1,
76 main_Caption_2_in_2,
77 main_Caption_2_in_3,
78 main_Caption_2_in_4,
79 main_Caption_2_in_5,
80 main_Caption_2_in_6,
81 main_Caption_2_in_7,
82 main_Caption_2_in_8,
83 main_Caption_2_in_9
84 ) [instance: 2, cache: 1];
85 //
86 // node Color[1]: x = 109, y = 346, inputs = 5, label = Color
87 // input[2]: defaulting = 0, visible = 1, type = 32, value = "orange"
88 // page group: scalar_viz
89 //
90 main_Color_1_out_1 =
91 Color(
92 main_AutoGlyph_1_out_1,
93 main_Color_1_in_2,
94 main_Color_1_in_3,
95 main_Color_1_in_4,
96 main_Color_1_in_5
97 ) [instance: 1, cache: 1];
98 //
99 // node Collect[3]: x = 247, y = 553, inputs = 2, label = Collect
100 // page group: scalar_viz
101 //
102 main_Collect_3_out_1 =
103 Collect(
104 main_Color_1_out_1,
105 main_Caption_2_out_1
106 ) [instance: 3, cache: 1];
107 //
108 // node Image[5]: x = 369, y = 580, inputs = 49, label = Image
109 // input[1]: defaulting = 0, visible = 0, type = 67108863, value = "Image_5"
110 // input[4]: defaulting = 0, visible = 0, type = 1, value = 1
111 // input[5]: defaulting = 0, visible = 0, type = 8, value = [0.00478274 0.00558007 -1.13249e-06]
112 // input[6]: defaulting = 0, visible = 0, type = 8, value = [0.00478274 0.00558007 11.0732]
113 // input[7]: defaulting = 0, visible = 0, type = 5, value = 5.93411
114 // input[8]: defaulting = 0, visible = 0, type = 1, value = 701
115 // input[9]: defaulting = 0, visible = 0, type = 5, value = 0.703
116 // input[10]: defaulting = 0, visible = 0, type = 8, value = [0 1 0]
117 // input[11]: defaulting = 0, visible = 0, type = 5, value = 30.0
118 // input[12]: defaulting = 0, visible = 0, type = 1, value = 0
119 // input[14]: defaulting = 0, visible = 0, type = 1, value = 1
120 // input[15]: defaulting = 1, visible = 0, type = 32, value = "none"
121 // input[16]: defaulting = 1, visible = 0, type = 32, value = "none"
122 // input[17]: defaulting = 1, visible = 0, type = 1, value = 1
123 // input[18]: defaulting = 1, visible = 0, type = 1, value = 1
124 // input[19]: defaulting = 0, visible = 0, type = 1, value = 0
125 // input[29]: defaulting = 0, visible = 0, type = 3, value = 1
126 // input[41]: defaulting = 0, visible = 0, type = 32, value = "rotate"
127 // page group: scalar_viz
128 // depth: value = 16
129 // window: position = (0.2221,0.3857), size = 0.5107x0.5114
130 // internal caching: 1
131 //
132 main_Image_5_out_1,
133 main_Image_5_out_2,
134 main_Image_5_out_3 =
135 Image(
136 main_Image_5_in_1,
137 main_Collect_3_out_1,
138 main_Image_5_in_3,
139 main_Image_5_in_4,
140 main_Image_5_in_5,
141 main_Image_5_in_6,
142 main_Image_5_in_7,
143 main_Image_5_in_8,
144 main_Image_5_in_9,
145 main_Image_5_in_10,
146 main_Image_5_in_11,
147 main_Image_5_in_12,
148 main_Image_5_in_13,
149 main_Image_5_in_14,
150 main_Image_5_in_15,
151 main_Image_5_in_16,
152 main_Image_5_in_17,
153 main_Image_5_in_18,
154 main_Image_5_in_19,
155 main_Image_5_in_20,
156 main_Image_5_in_21,
157 main_Image_5_in_22,
158 main_Image_5_in_23,
159 main_Image_5_in_24,
160 main_Image_5_in_25,
161 main_Image_5_in_26,
162 main_Image_5_in_27,
163 main_Image_5_in_28,
164 main_Image_5_in_29,
165 main_Image_5_in_30,
166 main_Image_5_in_31,
167 main_Image_5_in_32,
168 main_Image_5_in_33,
169 main_Image_5_in_34,
170 main_Image_5_in_35,
171 main_Image_5_in_36,
172 main_Image_5_in_37,
173 main_Image_5_in_38,
174 main_Image_5_in_39,
175 main_Image_5_in_40,
176 main_Image_5_in_41,
177 main_Image_5_in_42,
178 main_Image_5_in_43,
179 main_Image_5_in_44,
180 main_Image_5_in_45,
181 main_Image_5_in_46,
182 main_Image_5_in_47,
183 main_Image_5_in_48,
184 main_Image_5_in_49
185 ) [instance: 5, cache: 1];
186 // network: end of macro body
187 CacheScene(main_Image_5_in_1, main_Image_5_out_1, main_Image_5_out_2);
188 }
189 main_FileSelector_2_out_1 = "visu_vector3d.dxhead";
190 main_Import_2_in_2 = NULL;
191 main_Import_2_in_3 = "general";
192 main_Import_2_in_4 = NULL;
193 main_Import_2_in_5 = NULL;
194 main_Import_2_in_6 = NULL;
195 main_Import_2_out_1 = NULL;
196 main_Attribute_1_in_2 = NULL;
197 main_Attribute_1_out_1 = NULL;
198 main_AutoGlyph_1_in_2 = NULL;
199 main_AutoGlyph_1_in_3 = NULL;
200 main_AutoGlyph_1_in_4 = NULL;
201 main_AutoGlyph_1_in_5 = NULL;
202 main_AutoGlyph_1_in_6 = NULL;
203 main_AutoGlyph_1_in_7 = NULL;
204 main_AutoGlyph_1_out_1 = NULL;
205 main_Caption_2_in_2 = NULL;
206 main_Caption_2_in_3 = NULL;
207 main_Caption_2_in_4 = NULL;
208 main_Caption_2_in_5 = NULL;
209 main_Caption_2_in_6 = NULL;
210 main_Caption_2_in_7 = NULL;
211 main_Caption_2_in_8 = NULL;
212 main_Caption_2_in_9 = NULL;
213 main_Caption_2_out_1 = NULL;
214 main_Color_1_in_2 = "orange";
215 main_Color_1_in_3 = NULL;
216 main_Color_1_in_4 = NULL;
217 main_Color_1_in_5 = NULL;
218 main_Color_1_out_1 = NULL;
219 main_Collect_3_out_1 = NULL;
220 macro Image(
221 id,
222 object,
223 where,
224 useVector,
225 to,
226 from,
227 width,
228 resolution,
229 aspect,
230 up,
231 viewAngle,
232 perspective,
233 options,
234 buttonState = 1,
235 buttonUpApprox = "none",
236 buttonDownApprox = "none",
237 buttonUpDensity = 1,
238 buttonDownDensity = 1,
239 renderMode = 0,
240 defaultCamera,
241 reset,
242 backgroundColor,
243 throttle,
244 RECenable = 0,
245 RECfile,
246 RECformat,
247 RECresolution,
248 RECaspect,
249 AAenable = 0,
250 AAlabels,
251 AAticks,
252 AAcorners,
253 AAframe,
254 AAadjust,
255 AAcursor,
256 AAgrid,
257 AAcolors,
258 AAannotation,
259 AAlabelscale,
260 AAfont,
261 interactionMode,
262 title,
263 AAxTickLocs,
264 AAyTickLocs,
265 AAzTickLocs,
266 AAxTickLabels,
267 AAyTickLabels,
268 AAzTickLabels,
269 webOptions) -> (
270 object,
271 camera,
272 where)
273 {
274 ImageMessage(
275 id,
276 backgroundColor,
277 throttle,
278 RECenable,
279 RECfile,
280 RECformat,
281 RECresolution,
282 RECaspect,
283 AAenable,
284 AAlabels,
285 AAticks,
286 AAcorners,
287 AAframe,
288 AAadjust,
289 AAcursor,
290 AAgrid,
291 AAcolors,
292 AAannotation,
293 AAlabelscale,
294 AAfont,
295 AAxTickLocs,
296 AAyTickLocs,
297 AAzTickLocs,
298 AAxTickLabels,
299 AAyTickLabels,
300 AAzTickLabels,
301 interactionMode,
302 title,
303 renderMode,
304 buttonUpApprox,
305 buttonDownApprox,
306 buttonUpDensity,
307 buttonDownDensity) [instance: 1, cache: 1];
308 autoCamera =
309 AutoCamera(
310 object,
311 "front",
312 object,
313 resolution,
314 aspect,
315 [0,1,0],
316 perspective,
317 viewAngle,
318 backgroundColor) [instance: 1, cache: 1];
319 realCamera =
320 Camera(
321 to,
322 from,
323 width,
324 resolution,
325 aspect,
326 up,
327 perspective,
328 viewAngle,
329 backgroundColor) [instance: 1, cache: 1];
330 coloredDefaultCamera =
331 UpdateCamera(defaultCamera,
332 background=backgroundColor) [instance: 1, cache: 1];
333 nullDefaultCamera =
334 Inquire(defaultCamera,
335 "is null + 1") [instance: 1, cache: 1];
336 resetCamera =
337 Switch(
338 nullDefaultCamera,
339 coloredDefaultCamera,
340 autoCamera) [instance: 1, cache: 1];
341 resetNull =
342 Inquire(
343 reset,
344 "is null + 1") [instance: 2, cache: 1];
345 reset =
346 Switch(
347 resetNull,
348 reset,
349 0) [instance: 2, cache: 1];
350 whichCamera =
351 Compute(
352 "($0 != 0 || $1 == 0) ? 1 : 2",
353 reset,
354 useVector) [instance: 1, cache: 1];
355 camera = Switch(
356 whichCamera,
357 resetCamera,
358 realCamera) [instance: 3, cache: 1];
359 AAobject =
360 AutoAxes(
361 object,
362 camera,
363 AAlabels,
364 AAticks,
365 AAcorners,
366 AAframe,
367 AAadjust,
368 AAcursor,
369 AAgrid,
370 AAcolors,
371 AAannotation,
372 AAlabelscale,
373 AAfont,
374 AAxTickLocs,
375 AAyTickLocs,
376 AAzTickLocs,
377 AAxTickLabels,
378 AAyTickLabels,
379 AAzTickLabels) [instance: 1, cache: 1];
380 switchAAenable = Compute("$0+1",
381 AAenable) [instance: 2, cache: 1];
382 object = Switch(
383 switchAAenable,
384 object,
385 AAobject) [instance:4, cache: 1];
386 SWapproximation_options =
387 Switch(
388 buttonState,
389 buttonUpApprox,
390 buttonDownApprox) [instance: 5, cache: 1];
391 SWdensity_options =
392 Switch(
393 buttonState,
394 buttonUpDensity,
395 buttonDownDensity) [instance: 6, cache: 1];
396 HWapproximation_options =
397 Format(
398 "%s,%s",
399 buttonDownApprox,
400 buttonUpApprox) [instance: 1, cache: 1];
401 HWdensity_options =
402 Format(
403 "%d,%d",
404 buttonDownDensity,
405 buttonUpDensity) [instance: 2, cache: 1];
406 switchRenderMode = Compute(
407 "$0+1",
408 renderMode) [instance: 3, cache: 1];
409 approximation_options = Switch(
410 switchRenderMode,
411 SWapproximation_options,
412 HWapproximation_options) [instance: 7, cache: 1];
413 density_options = Switch(
414 switchRenderMode,
415 SWdensity_options,
416 HWdensity_options) [instance: 8, cache: 1];
417 renderModeString = Switch(
418 switchRenderMode,
419 "software",
420 "hardware")[instance: 9, cache: 1];
421 object_tag = Inquire(
422 object,
423 "object tag")[instance: 3, cache: 1];
424 annoted_object =
425 Options(
426 object,
427 "send boxes",
428 0,
429 "cache",
430 1,
431 "object tag",
432 object_tag,
433 "ddcamera",
434 whichCamera,
435 "rendering approximation",
436 approximation_options,
437 "render every",
438 density_options,
439 "button state",
440 buttonState,
441 "rendering mode",
442 renderModeString) [instance: 1, cache: 1];
443 RECresNull =
444 Inquire(
445 RECresolution,
446 "is null + 1") [instance: 4, cache: 1];
447 ImageResolution =
448 Inquire(
449 camera,
450 "camera resolution") [instance: 5, cache: 1];
451 RECresolution =
452 Switch(
453 RECresNull,
454 RECresolution,
455 ImageResolution) [instance: 10, cache: 1];
456 RECaspectNull =
457 Inquire(
458 RECaspect,
459 "is null + 1") [instance: 6, cache: 1];
460 ImageAspect =
461 Inquire(
462 camera,
463 "camera aspect") [instance: 7, cache: 1];
464 RECaspect =
465 Switch(
466 RECaspectNull,
467 RECaspect,
468 ImageAspect) [instance: 11, cache: 1];
469 switchRECenable = Compute(
470 "$0 == 0 ? 1 : (($2 == $3) && ($4 == $5)) ? ($1 == 1 ? 2 : 3) : 4",
471 RECenable,
472 switchRenderMode,
473 RECresolution,
474 ImageResolution,
475 RECaspect,
476 ImageAspect) [instance: 4, cache: 1];
477 NoRECobject, RECNoRerenderObject, RECNoRerHW, RECRerenderObject = Route(switchRECenable, annoted_object);
478 Display(
479 NoRECobject,
480 camera,
481 where,
482 throttle) [instance: 1, cache: 1];
483 image =
484 Render(
485 RECNoRerenderObject,
486 camera) [instance: 1, cache: 1];
487 Display(
488 image,
489 NULL,
490 where,
491 throttle) [instance: 2, cache: 1];
492 WriteImage(
493 image,
494 RECfile,
495 RECformat) [instance: 1, cache: 1];
496 rec_where = Display(
497 RECNoRerHW,
498 camera,
499 where,
500 throttle) [instance: 1, cache: 0];
501 rec_image = ReadImageWindow(
502 rec_where) [instance: 1, cache: 1];
503 WriteImage(
504 rec_image,
505 RECfile,
506 RECformat) [instance: 1, cache: 1];
507 RECupdateCamera =
508 UpdateCamera(
509 camera,
510 resolution=RECresolution,
511 aspect=RECaspect) [instance: 2, cache: 1];
512 Display(
513 RECRerenderObject,
514 camera,
515 where,
516 throttle) [instance: 1, cache: 1];
517 RECRerenderObject =
518 ScaleScreen(
519 RECRerenderObject,
520 NULL,
521 RECresolution,
522 camera) [instance: 1, cache: 1];
523 image =
524 Render(
525 RECRerenderObject,
526 RECupdateCamera) [instance: 2, cache: 1];
527 WriteImage(
528 image,
529 RECfile,
530 RECformat) [instance: 2, cache: 1];
531 }
532 main_Image_5_in_1 = "Image_5";
533 main_Image_5_in_3 = "X16,,";
534 main_Image_5_in_4 = 1;
535 main_Image_5_in_5 = [0.00478274 0.00558007 -1.13249e-06];
536 main_Image_5_in_6 = [0.00478274 0.00558007 11.0732];
537 main_Image_5_in_7 = 5.93411;
538 main_Image_5_in_8 = 701;
539 main_Image_5_in_9 = 0.703;
540 main_Image_5_in_10 = [0 1 0];
541 main_Image_5_in_11 = 30.0;
542 main_Image_5_in_12 = 0;
543 main_Image_5_in_13 = NULL;
544 main_Image_5_in_14 = 1;
545 main_Image_5_in_15 = NULL;
546 main_Image_5_in_16 = NULL;
547 main_Image_5_in_17 = NULL;
548 main_Image_5_in_18 = NULL;
549 main_Image_5_in_19 = 0;
550 main_Image_5_in_20 = NULL;
551 main_Image_5_in_21 = NULL;
552 main_Image_5_in_22 = NULL;
553 main_Image_5_in_23 = NULL;
554 main_Image_5_in_25 = NULL;
555 main_Image_5_in_26 = NULL;
556 main_Image_5_in_27 = NULL;
557 main_Image_5_in_28 = NULL;
558 main_Image_5_in_29 = 1;
559 main_Image_5_in_30 = NULL;
560 main_Image_5_in_31 = NULL;
561 main_Image_5_in_32 = NULL;
562 main_Image_5_in_33 = NULL;
563 main_Image_5_in_34 = NULL;
564 main_Image_5_in_35 = NULL;
565 main_Image_5_in_36 = NULL;
566 main_Image_5_in_37 = NULL;
567 main_Image_5_in_38 = NULL;
568 main_Image_5_in_39 = NULL;
569 main_Image_5_in_40 = NULL;
570 main_Image_5_in_41 = "rotate";
571 main_Image_5_in_42 = NULL;
572 main_Image_5_in_43 = NULL;
573 main_Image_5_in_44 = NULL;
574 main_Image_5_in_45 = NULL;
575 main_Image_5_in_46 = NULL;
576 main_Image_5_in_47 = NULL;
577 main_Image_5_in_48 = NULL;
578 main_Image_5_in_49 = NULL;
579 Executive("product version 4 3 0");
580 $sync
581 main();