~ubuntu-branches/ubuntu/saucy/deal.ii/saucy

« back to all changes in this revision

Viewing changes to contrib/dx/grid_boundary.net

  • Committer: Bazaar Package Importer
  • Author(s): Adam C. Powell, IV
  • Date: 2009-05-08 23:13:50 UTC
  • Revision ID: james.westby@ubuntu.com-20090508231350-rrh1ltgi0tifabwc
Tags: upstream-6.2.0
ImportĀ upstreamĀ versionĀ 6.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// time: Wed Dec 19 15:41:09 2001
 
3
//
 
4
// version: 3.1.2 (format), 4.1.3 (DX)
 
5
//
 
6
//
 
7
// MODULE main
 
8
// workspace: width = 500, height = 606
 
9
// layout: snap = 1, width = 50, height = 50, align = CC
 
10
//
 
11
macro main(
 
12
) -> (
 
13
) {
 
14
    // 
 
15
    // node FileSelector[2]: x = 31, y = 44, inputs = 0, label = FileSelector
 
16
    // output[1]: visible = 1, type = 32, value = NULL
 
17
    // output[2]: visible = 1, type = 32, value = NULL
 
18
    //
 
19
    // 
 
20
    // node Import[1]: x = 39, y = 144, inputs = 6, label = Import
 
21
    //
 
22
main_Import_1_out_1 = 
 
23
    Import(
 
24
    main_FileSelector_2_out_1,
 
25
    main_Import_1_in_2,
 
26
    main_Import_1_in_3,
 
27
    main_Import_1_in_4,
 
28
    main_Import_1_in_5,
 
29
    main_Import_1_in_6
 
30
    ) [instance: 1, cache: 1];
 
31
    // 
 
32
    // node ShowConnections[1]: x = 9, y = 244, inputs = 1, label = ShowConnections
 
33
    //
 
34
main_ShowConnections_1_out_1 = 
 
35
    ShowConnections(
 
36
    main_Import_1_out_1
 
37
    ) [instance: 1, cache: 1];
 
38
    // 
 
39
    // node Color[1]: x = 39, y = 344, inputs = 5, label = Color
 
40
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "black"
 
41
    //
 
42
main_Color_1_out_1 = 
 
43
    Color(
 
44
    main_ShowConnections_1_out_1,
 
45
    main_Color_1_in_2,
 
46
    main_Color_1_in_3,
 
47
    main_Color_1_in_4,
 
48
    main_Color_1_in_5
 
49
    ) [instance: 1, cache: 1];
 
50
    // 
 
51
    // node ShowBoundary[1]: x = 169, y = 244, inputs = 2, label = ShowBoundary
 
52
    //
 
53
main_ShowBoundary_1_out_1 = 
 
54
    ShowBoundary(
 
55
    main_Import_1_out_1,
 
56
    main_ShowBoundary_1_in_2
 
57
    ) [instance: 1, cache: 1];
 
58
    // 
 
59
    // node Scalar[1]: x = 400, y = 44, inputs = 11, label = Scalar
 
60
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "Scalar_1"
 
61
    // input[3]: defaulting = 0, visible = 0, type = 5, value = 0.5 
 
62
    // input[5]: defaulting = 1, visible = 0, type = 5, value = -1000000.0
 
63
    // input[6]: defaulting = 1, visible = 0, type = 5, value = 1000000.0
 
64
    // input[7]: defaulting = 1, visible = 0, type = 5, value = 1.0
 
65
    // input[9]: defaulting = 1, visible = 0, type = 1, value = 5
 
66
    // output[1]: visible = 1, type = 5, value = 0.5 
 
67
    //
 
68
    // 
 
69
    // node Color[2]: x = 239, y = 344, inputs = 5, label = Color
 
70
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "red"
 
71
    // input[3]: defaulting = 1, visible = 1, type = 5, value = .5
 
72
    //
 
73
main_Color_2_out_1 = 
 
74
    Color(
 
75
    main_ShowBoundary_1_out_1,
 
76
    main_Color_2_in_2,
 
77
    main_Scalar_1_out_1,
 
78
    main_Color_2_in_4,
 
79
    main_Color_2_in_5
 
80
    ) [instance: 2, cache: 1];
 
81
    // 
 
82
    // node Collect[1]: x = 148, y = 444, inputs = 2, label = Collect
 
83
    //
 
84
main_Collect_1_out_1 = 
 
85
    Collect(
 
86
    main_Color_1_out_1,
 
87
    main_Color_2_out_1
 
88
    ) [instance: 1, cache: 1];
 
89
    // 
 
90
    // node Image[1]: x = 139, y = 544, inputs = 49, label = Image
 
91
    // input[1]: defaulting = 0, visible = 0, type = 67108863, value = "Image_1"
 
92
    // input[4]: defaulting = 0, visible = 0, type = 1, value = 0
 
93
    // input[5]: defaulting = 1, visible = 0, type = 8, value = [0 0 0]
 
94
    // input[6]: defaulting = 1, visible = 0, type = 8, value = [6.81977 -3.672 -3.97284]
 
95
    // input[7]: defaulting = 0, visible = 0, type = 5, value = 4.66499
 
96
    // input[8]: defaulting = 0, visible = 0, type = 1, value = 640
 
97
    // input[9]: defaulting = 0, visible = 0, type = 5, value = 0.750781
 
98
    // input[10]: defaulting = 1, visible = 0, type = 8, value = [0 1 0]
 
99
    // input[11]: defaulting = 1, visible = 0, type = 5, value = 30.0001
 
100
    // input[12]: defaulting = 0, visible = 0, type = 1, value = 0
 
101
    // input[14]: defaulting = 0, visible = 0, type = 1, value = 1
 
102
    // input[15]: defaulting = 1, visible = 0, type = 32, value = "none"
 
103
    // input[16]: defaulting = 1, visible = 0, type = 32, value = "none"
 
104
    // input[17]: defaulting = 1, visible = 0, type = 1, value = 1
 
105
    // input[18]: defaulting = 1, visible = 0, type = 1, value = 1
 
106
    // input[19]: defaulting = 0, visible = 0, type = 3, value = 0
 
107
    // input[22]: defaulting = 0, visible = 0, type = 32, value = "white"
 
108
    // input[29]: defaulting = 1, visible = 0, type = 3, value = 0
 
109
    // input[41]: defaulting = 0, visible = 0, type = 32, value = "rotate"
 
110
    // depth: value = 24
 
111
    // window: position = (0.4500,0.3291), size = 0.5109x0.5117
 
112
    // internal caching: 1
 
113
    //
 
114
main_Image_1_out_1,
 
115
main_Image_1_out_2,
 
116
main_Image_1_out_3 = 
 
117
    Image(
 
118
    main_Image_1_in_1,
 
119
    main_Collect_1_out_1,
 
120
    main_Image_1_in_3,
 
121
    main_Image_1_in_4,
 
122
    main_Image_1_in_5,
 
123
    main_Image_1_in_6,
 
124
    main_Image_1_in_7,
 
125
    main_Image_1_in_8,
 
126
    main_Image_1_in_9,
 
127
    main_Image_1_in_10,
 
128
    main_Image_1_in_11,
 
129
    main_Image_1_in_12,
 
130
    main_Image_1_in_13,
 
131
    main_Image_1_in_14,
 
132
    main_Image_1_in_15,
 
133
    main_Image_1_in_16,
 
134
    main_Image_1_in_17,
 
135
    main_Image_1_in_18,
 
136
    main_Image_1_in_19,
 
137
    main_Image_1_in_20,
 
138
    main_Image_1_in_21,
 
139
    main_Image_1_in_22,
 
140
    main_Image_1_in_23,
 
141
    main_Image_1_in_24,
 
142
    main_Image_1_in_25,
 
143
    main_Image_1_in_26,
 
144
    main_Image_1_in_27,
 
145
    main_Image_1_in_28,
 
146
    main_Image_1_in_29,
 
147
    main_Image_1_in_30,
 
148
    main_Image_1_in_31,
 
149
    main_Image_1_in_32,
 
150
    main_Image_1_in_33,
 
151
    main_Image_1_in_34,
 
152
    main_Image_1_in_35,
 
153
    main_Image_1_in_36,
 
154
    main_Image_1_in_37,
 
155
    main_Image_1_in_38,
 
156
    main_Image_1_in_39,
 
157
    main_Image_1_in_40,
 
158
    main_Image_1_in_41,
 
159
    main_Image_1_in_42,
 
160
    main_Image_1_in_43,
 
161
    main_Image_1_in_44,
 
162
    main_Image_1_in_45,
 
163
    main_Image_1_in_46,
 
164
    main_Image_1_in_47,
 
165
    main_Image_1_in_48,
 
166
    main_Image_1_in_49
 
167
    ) [instance: 1, cache: 1];
 
168
// network: end of macro body
 
169
CacheScene(main_Image_1_in_1, main_Image_1_out_1, main_Image_1_out_2);
 
170
}
 
171
main_FileSelector_2_out_1 = NULL;
 
172
main_Import_1_in_2 = NULL;
 
173
main_Import_1_in_3 = NULL;
 
174
main_Import_1_in_4 = NULL;
 
175
main_Import_1_in_5 = NULL;
 
176
main_Import_1_in_6 = NULL;
 
177
main_Import_1_out_1 = NULL;
 
178
main_ShowConnections_1_out_1 = NULL;
 
179
main_Color_1_in_2 = "black";
 
180
main_Color_1_in_3 = NULL;
 
181
main_Color_1_in_4 = NULL;
 
182
main_Color_1_in_5 = NULL;
 
183
main_Color_1_out_1 = NULL;
 
184
main_ShowBoundary_1_in_2 = NULL;
 
185
main_ShowBoundary_1_out_1 = NULL;
 
186
main_Scalar_1_in_1 = "Scalar_1";
 
187
main_Scalar_1_in_2 = NULL;
 
188
main_Scalar_1_in_3 = 0.5 ;
 
189
main_Scalar_1_in_4 = NULL;
 
190
main_Scalar_1_in_5 = NULL;
 
191
main_Scalar_1_in_6 = NULL;
 
192
main_Scalar_1_in_7 = NULL;
 
193
main_Scalar_1_in_8 = NULL;
 
194
main_Scalar_1_in_9 = NULL;
 
195
main_Scalar_1_in_10 = NULL;
 
196
main_Scalar_1_in_11 = NULL;
 
197
main_Scalar_1_out_1 = 0.5 ;
 
198
main_Color_2_in_2 = "red";
 
199
main_Color_2_in_4 = NULL;
 
200
main_Color_2_in_5 = NULL;
 
201
main_Color_2_out_1 = NULL;
 
202
main_Collect_1_out_1 = NULL;
 
203
macro Image(
 
204
        id,
 
205
        object,
 
206
        where,
 
207
        useVector,
 
208
        to,
 
209
        from,
 
210
        width,
 
211
        resolution,
 
212
        aspect,
 
213
        up,
 
214
        viewAngle,
 
215
        perspective,
 
216
        options,
 
217
        buttonState = 1,
 
218
        buttonUpApprox = "none",
 
219
        buttonDownApprox = "none",
 
220
        buttonUpDensity = 1,
 
221
        buttonDownDensity = 1,
 
222
        renderMode = 0,
 
223
        defaultCamera,
 
224
        reset,
 
225
        backgroundColor,
 
226
        throttle,
 
227
        RECenable = 0,
 
228
        RECfile,
 
229
        RECformat,
 
230
        RECresolution,
 
231
        RECaspect,
 
232
        AAenable = 0,
 
233
        AAlabels,
 
234
        AAticks,
 
235
        AAcorners,
 
236
        AAframe,
 
237
        AAadjust,
 
238
        AAcursor,
 
239
        AAgrid,
 
240
        AAcolors,
 
241
        AAannotation,
 
242
        AAlabelscale,
 
243
        AAfont,
 
244
        interactionMode,
 
245
        title,
 
246
        AAxTickLocs,
 
247
        AAyTickLocs,
 
248
        AAzTickLocs,
 
249
        AAxTickLabels,
 
250
        AAyTickLabels,
 
251
        AAzTickLabels,
 
252
        webOptions) -> (
 
253
        object,
 
254
        camera,
 
255
        where)
 
256
{
 
257
    ImageMessage(
 
258
        id,
 
259
        backgroundColor,
 
260
        throttle,
 
261
        RECenable,
 
262
        RECfile,
 
263
        RECformat,
 
264
        RECresolution,
 
265
        RECaspect,
 
266
        AAenable,
 
267
        AAlabels,
 
268
        AAticks,
 
269
        AAcorners,
 
270
        AAframe,
 
271
        AAadjust,
 
272
        AAcursor,
 
273
        AAgrid,
 
274
        AAcolors,
 
275
        AAannotation,
 
276
        AAlabelscale,
 
277
        AAfont,
 
278
        AAxTickLocs,
 
279
        AAyTickLocs,
 
280
        AAzTickLocs,
 
281
        AAxTickLabels,
 
282
        AAyTickLabels,
 
283
        AAzTickLabels,
 
284
        interactionMode,
 
285
        title,
 
286
        renderMode,
 
287
        buttonUpApprox,
 
288
        buttonDownApprox,
 
289
        buttonUpDensity,
 
290
        buttonDownDensity) [instance: 1, cache: 1];
 
291
    autoCamera =
 
292
        AutoCamera(
 
293
            object,
 
294
            "front",
 
295
            object,
 
296
            resolution,
 
297
            aspect,
 
298
            [0,1,0],
 
299
            perspective,
 
300
            viewAngle,
 
301
            backgroundColor) [instance: 1, cache: 1];
 
302
    realCamera =
 
303
        Camera(
 
304
            to,
 
305
            from,
 
306
            width,
 
307
            resolution,
 
308
            aspect,
 
309
            up,
 
310
            perspective,
 
311
            viewAngle,
 
312
            backgroundColor) [instance: 1, cache: 1];
 
313
    coloredDefaultCamera = 
 
314
         UpdateCamera(defaultCamera,
 
315
            background=backgroundColor) [instance: 1, cache: 1];
 
316
    nullDefaultCamera =
 
317
        Inquire(defaultCamera,
 
318
            "is null + 1") [instance: 1, cache: 1];
 
319
    resetCamera =
 
320
        Switch(
 
321
            nullDefaultCamera,
 
322
            coloredDefaultCamera,
 
323
            autoCamera) [instance: 1, cache: 1];
 
324
    resetNull = 
 
325
        Inquire(
 
326
            reset,
 
327
            "is null + 1") [instance: 2, cache: 1];
 
328
    reset =
 
329
        Switch(
 
330
            resetNull,
 
331
            reset,
 
332
            0) [instance: 2, cache: 1];
 
333
    whichCamera =
 
334
        Compute(
 
335
            "($0 != 0 || $1 == 0) ? 1 : 2",
 
336
            reset,
 
337
            useVector) [instance: 1, cache: 1];
 
338
    camera = Switch(
 
339
            whichCamera,
 
340
            resetCamera,
 
341
            realCamera) [instance: 3, cache: 1];
 
342
    AAobject =
 
343
        AutoAxes(
 
344
            object,
 
345
            camera,
 
346
            AAlabels,
 
347
            AAticks,
 
348
            AAcorners,
 
349
            AAframe,
 
350
            AAadjust,
 
351
            AAcursor,
 
352
            AAgrid,
 
353
            AAcolors,
 
354
            AAannotation,
 
355
            AAlabelscale,
 
356
            AAfont,
 
357
            AAxTickLocs,
 
358
            AAyTickLocs,
 
359
            AAzTickLocs,
 
360
            AAxTickLabels,
 
361
            AAyTickLabels,
 
362
            AAzTickLabels) [instance: 1, cache: 1];
 
363
    switchAAenable = Compute("$0+1",
 
364
             AAenable) [instance: 2, cache: 1];
 
365
    object = Switch(
 
366
             switchAAenable,
 
367
             object,
 
368
             AAobject) [instance:4, cache: 1];
 
369
    SWapproximation_options =
 
370
        Switch(
 
371
            buttonState,
 
372
            buttonUpApprox,
 
373
            buttonDownApprox) [instance: 5, cache: 1];
 
374
    SWdensity_options =
 
375
        Switch(
 
376
            buttonState,
 
377
            buttonUpDensity,
 
378
            buttonDownDensity) [instance: 6, cache: 1];
 
379
    HWapproximation_options =
 
380
        Format(
 
381
            "%s,%s",
 
382
            buttonDownApprox,
 
383
            buttonUpApprox) [instance: 1, cache: 1];
 
384
    HWdensity_options =
 
385
        Format(
 
386
            "%d,%d",
 
387
            buttonDownDensity,
 
388
            buttonUpDensity) [instance: 2, cache: 1];
 
389
    switchRenderMode = Compute(
 
390
             "$0+1",
 
391
             renderMode) [instance: 3, cache: 1];
 
392
    approximation_options = Switch(
 
393
             switchRenderMode,
 
394
            SWapproximation_options,
 
395
             HWapproximation_options) [instance: 7, cache: 1];
 
396
    density_options = Switch(
 
397
             switchRenderMode,
 
398
            SWdensity_options,
 
399
            HWdensity_options) [instance: 8, cache: 1];
 
400
    renderModeString = Switch(
 
401
            switchRenderMode,
 
402
            "software",
 
403
            "hardware")[instance: 9, cache: 1];
 
404
    object_tag = Inquire(
 
405
            object,
 
406
            "object tag")[instance: 3, cache: 1];
 
407
    annoted_object =
 
408
        Options(
 
409
            object,
 
410
            "send boxes",
 
411
            0,
 
412
            "cache",
 
413
            1,
 
414
            "object tag",
 
415
            object_tag,
 
416
            "ddcamera",
 
417
            whichCamera,
 
418
            "rendering approximation",
 
419
            approximation_options,
 
420
            "render every",
 
421
            density_options,
 
422
            "button state",
 
423
            buttonState,
 
424
            "rendering mode",
 
425
            renderModeString) [instance: 1, cache: 1];
 
426
    RECresNull =
 
427
        Inquire(
 
428
            RECresolution,
 
429
            "is null + 1") [instance: 4, cache: 1];
 
430
    ImageResolution =
 
431
        Inquire(
 
432
            camera,
 
433
            "camera resolution") [instance: 5, cache: 1];
 
434
    RECresolution =
 
435
        Switch(
 
436
            RECresNull,
 
437
            RECresolution,
 
438
            ImageResolution) [instance: 10, cache: 1];
 
439
    RECaspectNull =
 
440
        Inquire(
 
441
            RECaspect,
 
442
            "is null + 1") [instance: 6, cache: 1];
 
443
    ImageAspect =
 
444
        Inquire(
 
445
            camera,
 
446
            "camera aspect") [instance: 7, cache: 1];
 
447
    RECaspect =
 
448
        Switch(
 
449
            RECaspectNull,
 
450
            RECaspect,
 
451
            ImageAspect) [instance: 11, cache: 1];
 
452
    switchRECenable = Compute(
 
453
          "$0 == 0 ? 1 : (($2 == $3) && ($4 == $5)) ? ($1 == 1 ? 2 : 3) : 4",
 
454
            RECenable,
 
455
            switchRenderMode,
 
456
            RECresolution,
 
457
            ImageResolution,
 
458
            RECaspect,
 
459
             ImageAspect) [instance: 4, cache: 1];
 
460
    NoRECobject, RECNoRerenderObject, RECNoRerHW, RECRerenderObject = Route(switchRECenable, annoted_object);
 
461
    Display(
 
462
        NoRECobject,
 
463
        camera,
 
464
        where,
 
465
        throttle) [instance: 1, cache: 1];
 
466
    image =
 
467
        Render(
 
468
            RECNoRerenderObject,
 
469
            camera) [instance: 1, cache: 1];
 
470
    Display(
 
471
        image,
 
472
        NULL,
 
473
        where,
 
474
        throttle) [instance: 2, cache: 1];
 
475
    WriteImage(
 
476
        image,
 
477
        RECfile,
 
478
        RECformat) [instance: 1, cache: 1];
 
479
    rec_where = Display(
 
480
        RECNoRerHW,
 
481
        camera,
 
482
        where,
 
483
        throttle) [instance: 1, cache: 0];
 
484
    rec_image = ReadImageWindow(
 
485
        rec_where) [instance: 1, cache: 1];
 
486
    WriteImage(
 
487
        rec_image,
 
488
        RECfile,
 
489
        RECformat) [instance: 1, cache: 1];
 
490
    RECupdateCamera =
 
491
        UpdateCamera(
 
492
            camera,
 
493
            resolution=RECresolution,
 
494
            aspect=RECaspect) [instance: 2, cache: 1];
 
495
    Display(
 
496
        RECRerenderObject,
 
497
        camera,
 
498
        where,
 
499
        throttle) [instance: 1, cache: 1];
 
500
    RECRerenderObject =
 
501
        ScaleScreen(
 
502
            RECRerenderObject,
 
503
            NULL,
 
504
            RECresolution,
 
505
            camera) [instance: 1, cache: 1];
 
506
    image =
 
507
        Render(
 
508
            RECRerenderObject,
 
509
            RECupdateCamera) [instance: 2, cache: 1];
 
510
    WriteImage(
 
511
        image,
 
512
        RECfile,
 
513
        RECformat) [instance: 2, cache: 1];
 
514
}
 
515
main_Image_1_in_1 = "Image_1";
 
516
main_Image_1_in_3 = "X24,,";
 
517
main_Image_1_in_4 = 0;
 
518
main_Image_1_in_5 = NULL;
 
519
main_Image_1_in_6 = NULL;
 
520
main_Image_1_in_7 = 4.66499;
 
521
main_Image_1_in_8 = 640;
 
522
main_Image_1_in_9 = 0.750781;
 
523
main_Image_1_in_10 = NULL;
 
524
main_Image_1_in_11 = NULL;
 
525
main_Image_1_in_12 = 0;
 
526
main_Image_1_in_13 = NULL;
 
527
main_Image_1_in_14 = 1;
 
528
main_Image_1_in_15 = NULL;
 
529
main_Image_1_in_16 = NULL;
 
530
main_Image_1_in_17 = NULL;
 
531
main_Image_1_in_18 = NULL;
 
532
main_Image_1_in_19 = 0;
 
533
main_Image_1_in_20 = NULL;
 
534
main_Image_1_in_21 = NULL;
 
535
main_Image_1_in_22 = "white";
 
536
main_Image_1_in_23 = NULL;
 
537
main_Image_1_in_25 = NULL;
 
538
main_Image_1_in_26 = NULL;
 
539
main_Image_1_in_27 = NULL;
 
540
main_Image_1_in_28 = NULL;
 
541
main_Image_1_in_29 = NULL;
 
542
main_Image_1_in_30 = NULL;
 
543
main_Image_1_in_31 = NULL;
 
544
main_Image_1_in_32 = NULL;
 
545
main_Image_1_in_33 = NULL;
 
546
main_Image_1_in_34 = NULL;
 
547
main_Image_1_in_35 = NULL;
 
548
main_Image_1_in_36 = NULL;
 
549
main_Image_1_in_37 = NULL;
 
550
main_Image_1_in_38 = NULL;
 
551
main_Image_1_in_39 = NULL;
 
552
main_Image_1_in_40 = NULL;
 
553
main_Image_1_in_41 = "rotate";
 
554
main_Image_1_in_42 = NULL;
 
555
main_Image_1_in_43 = NULL;
 
556
main_Image_1_in_44 = NULL;
 
557
main_Image_1_in_45 = NULL;
 
558
main_Image_1_in_46 = NULL;
 
559
main_Image_1_in_47 = NULL;
 
560
main_Image_1_in_48 = NULL;
 
561
main_Image_1_in_49 = NULL;
 
562
Executive("product version 4 1 3");
 
563
$sync
 
564
main();