iexciting-0.9.224
[exciting.git] / examples / Ni-Fermi-surface / fermi.net
blob7a9ae8a96ede6e19bc9c5121a1bd99dd8fdcd5d7
1 //
2 // time: Thu Nov  6 12:08:29 2008
3 //
4 // version: 3.2.0 (format), 4.4.0 (DX)
5 //
6 //
7 // MODULE main
8 // workspace: width = 372, height = 548
9 // layout: snap = 0, width = 50, height = 50, align = NN
11 macro main(
12 ) -> (
13 ) {
14     // 
15     // node Import[1]: x = 147, y = 71, inputs = 6, label = Import
16     // input[1]: defaulting = 0, visible = 1, type = 32, value = "fermi_up.general"
17     //
18 main_Import_1_out_1 = 
19     Import(
20     main_Import_1_in_1,
21     main_Import_1_in_2,
22     main_Import_1_in_3,
23     main_Import_1_in_4,
24     main_Import_1_in_5,
25     main_Import_1_in_6
26     ) [instance: 1, cache: 1];
27     // 
28     // node Isosurface[1]: x = 146, y = 196, inputs = 6, label = Isosurface
29     // input[2]: defaulting = 0, visible = 1, type = 5, value = 0.0
30     //
31 main_Isosurface_1_out_1 = 
32     Isosurface(
33     main_Import_1_out_1,
34     main_Isosurface_1_in_2,
35     main_Isosurface_1_in_3,
36     main_Isosurface_1_in_4,
37     main_Isosurface_1_in_5,
38     main_Isosurface_1_in_6
39     ) [instance: 1, cache: 1];
40     // 
41     // node Color[1]: x = 154, y = 315, inputs = 5, label = Color
42     // input[2]: defaulting = 0, visible = 1, type = 32, value = "green"
43     //
44 main_Color_1_out_1 = 
45     Color(
46     main_Isosurface_1_out_1,
47     main_Color_1_in_2,
48     main_Color_1_in_3,
49     main_Color_1_in_4,
50     main_Color_1_in_5
51     ) [instance: 1, cache: 1];
52     // 
53     // node Import[2]: x = 291, y = 73, inputs = 6, label = Import
54     // input[1]: defaulting = 0, visible = 1, type = 32, value = "fermi_dn.general"
55     //
56 main_Import_2_out_1 = 
57     Import(
58     main_Import_2_in_1,
59     main_Import_2_in_2,
60     main_Import_2_in_3,
61     main_Import_2_in_4,
62     main_Import_2_in_5,
63     main_Import_2_in_6
64     ) [instance: 2, cache: 1];
65     // 
66     // node Isosurface[2]: x = 290, y = 194, inputs = 6, label = Isosurface
67     // input[2]: defaulting = 0, visible = 1, type = 5, value = 0.0
68     //
69 main_Isosurface_2_out_1 = 
70     Isosurface(
71     main_Import_2_out_1,
72     main_Isosurface_2_in_2,
73     main_Isosurface_2_in_3,
74     main_Isosurface_2_in_4,
75     main_Isosurface_2_in_5,
76     main_Isosurface_2_in_6
77     ) [instance: 2, cache: 1];
78     // 
79     // node Color[2]: x = 300, y = 313, inputs = 5, label = Color
80     // input[2]: defaulting = 0, visible = 1, type = 32, value = "yellow"
81     //
82 main_Color_2_out_1 = 
83     Color(
84     main_Isosurface_2_out_1,
85     main_Color_2_in_2,
86     main_Color_2_in_3,
87     main_Color_2_in_4,
88     main_Color_2_in_5
89     ) [instance: 2, cache: 1];
90     // 
91     // node Collect[1]: x = 231, y = 399, inputs = 2, label = Collect
92     //
93 main_Collect_1_out_1 = 
94     Collect(
95     main_Color_1_out_1,
96     main_Color_2_out_1
97     ) [instance: 1, cache: 1];
98     // 
99     // node Image[2]: x = 283, y = 486, inputs = 49, label = Image
100     // input[1]: defaulting = 0, visible = 0, type = 32, value = "Image_2"
101     // input[4]: defaulting = 0, visible = 0, type = 1, value = 1
102     // input[5]: defaulting = 0, visible = 0, type = 8, value = [0.459851 0.459851 0.459851]
103     // input[6]: defaulting = 0, visible = 0, type = 8, value = [5.36756 3.53923 7.97489]
104     // input[7]: defaulting = 0, visible = 0, type = 5, value = 5.08525
105     // input[8]: defaulting = 0, visible = 0, type = 1, value = 640
106     // input[9]: defaulting = 0, visible = 0, type = 5, value = 0.75
107     // input[10]: defaulting = 0, visible = 0, type = 8, value = [-0.0834371 0.940039 -0.330704]
108     // input[11]: defaulting = 1, visible = 0, type = 5, value = 30.0002
109     // input[12]: defaulting = 0, visible = 0, type = 1, value = 0
110     // input[14]: defaulting = 0, visible = 0, type = 1, value = 1
111     // input[15]: defaulting = 1, visible = 0, type = 32, value = "none"
112     // input[16]: defaulting = 1, visible = 0, type = 32, value = "none"
113     // input[17]: defaulting = 1, visible = 0, type = 1, value = 1
114     // input[18]: defaulting = 1, visible = 0, type = 1, value = 1
115     // input[19]: defaulting = 0, visible = 0, type = 1, value = 0
116     // input[29]: defaulting = 1, visible = 0, type = 3, value = 0
117     // input[41]: defaulting = 0, visible = 0, type = 32, value = "none"
118     // depth: value = 24
119     // window: position = (0.0104,0.0600), size = 0.4542x0.5800, screen = 0
120     // internal caching: 1
121     //
122 main_Image_2_out_1,
123 main_Image_2_out_2,
124 main_Image_2_out_3 = 
125     Image(
126     main_Image_2_in_1,
127     main_Collect_1_out_1,
128     main_Image_2_in_3,
129     main_Image_2_in_4,
130     main_Image_2_in_5,
131     main_Image_2_in_6,
132     main_Image_2_in_7,
133     main_Image_2_in_8,
134     main_Image_2_in_9,
135     main_Image_2_in_10,
136     main_Image_2_in_11,
137     main_Image_2_in_12,
138     main_Image_2_in_13,
139     main_Image_2_in_14,
140     main_Image_2_in_15,
141     main_Image_2_in_16,
142     main_Image_2_in_17,
143     main_Image_2_in_18,
144     main_Image_2_in_19,
145     main_Image_2_in_20,
146     main_Image_2_in_21,
147     main_Image_2_in_22,
148     main_Image_2_in_23,
149     main_Image_2_in_24,
150     main_Image_2_in_25,
151     main_Image_2_in_26,
152     main_Image_2_in_27,
153     main_Image_2_in_28,
154     main_Image_2_in_29,
155     main_Image_2_in_30,
156     main_Image_2_in_31,
157     main_Image_2_in_32,
158     main_Image_2_in_33,
159     main_Image_2_in_34,
160     main_Image_2_in_35,
161     main_Image_2_in_36,
162     main_Image_2_in_37,
163     main_Image_2_in_38,
164     main_Image_2_in_39,
165     main_Image_2_in_40,
166     main_Image_2_in_41,
167     main_Image_2_in_42,
168     main_Image_2_in_43,
169     main_Image_2_in_44,
170     main_Image_2_in_45,
171     main_Image_2_in_46,
172     main_Image_2_in_47,
173     main_Image_2_in_48,
174     main_Image_2_in_49
175     ) [instance: 2, cache: 1];
176 // network: end of macro body
177 CacheScene(main_Image_2_in_1, main_Image_2_out_1, main_Image_2_out_2);
179 main_Import_1_in_1 = "fermi_up.general";
180 main_Import_1_in_2 = NULL;
181 main_Import_1_in_3 = NULL;
182 main_Import_1_in_4 = NULL;
183 main_Import_1_in_5 = NULL;
184 main_Import_1_in_6 = NULL;
185 main_Import_1_out_1 = NULL;
186 main_Isosurface_1_in_2 = 0.0;
187 main_Isosurface_1_in_3 = NULL;
188 main_Isosurface_1_in_4 = NULL;
189 main_Isosurface_1_in_5 = NULL;
190 main_Isosurface_1_in_6 = NULL;
191 main_Isosurface_1_out_1 = NULL;
192 main_Color_1_in_2 = "green";
193 main_Color_1_in_3 = NULL;
194 main_Color_1_in_4 = NULL;
195 main_Color_1_in_5 = NULL;
196 main_Color_1_out_1 = NULL;
197 main_Import_2_in_1 = "fermi_dn.general";
198 main_Import_2_in_2 = NULL;
199 main_Import_2_in_3 = NULL;
200 main_Import_2_in_4 = NULL;
201 main_Import_2_in_5 = NULL;
202 main_Import_2_in_6 = NULL;
203 main_Import_2_out_1 = NULL;
204 main_Isosurface_2_in_2 = 0.0;
205 main_Isosurface_2_in_3 = NULL;
206 main_Isosurface_2_in_4 = NULL;
207 main_Isosurface_2_in_5 = NULL;
208 main_Isosurface_2_in_6 = NULL;
209 main_Isosurface_2_out_1 = NULL;
210 main_Color_2_in_2 = "yellow";
211 main_Color_2_in_3 = NULL;
212 main_Color_2_in_4 = NULL;
213 main_Color_2_in_5 = NULL;
214 main_Color_2_out_1 = NULL;
215 main_Collect_1_out_1 = NULL;
216 macro Image(
217         id,
218         object,
219         where,
220         useVector,
221         to,
222         from,
223         width,
224         resolution,
225         aspect,
226         up,
227         viewAngle,
228         perspective,
229         options,
230         buttonState = 1,
231         buttonUpApprox = "none",
232         buttonDownApprox = "none",
233         buttonUpDensity = 1,
234         buttonDownDensity = 1,
235         renderMode = 0,
236         defaultCamera,
237         reset,
238         backgroundColor,
239         throttle,
240         RECenable = 0,
241         RECfile,
242         RECformat,
243         RECresolution,
244         RECaspect,
245         AAenable = 0,
246         AAlabels,
247         AAticks,
248         AAcorners,
249         AAframe,
250         AAadjust,
251         AAcursor,
252         AAgrid,
253         AAcolors,
254         AAannotation,
255         AAlabelscale,
256         AAfont,
257         interactionMode,
258         title,
259         AAxTickLocs,
260         AAyTickLocs,
261         AAzTickLocs,
262         AAxTickLabels,
263         AAyTickLabels,
264         AAzTickLabels,
265         webOptions) -> (
266         object,
267         camera,
268         where)
270     ImageMessage(
271         id,
272         backgroundColor,
273         throttle,
274         RECenable,
275         RECfile,
276         RECformat,
277         RECresolution,
278         RECaspect,
279         AAenable,
280         AAlabels,
281         AAticks,
282         AAcorners,
283         AAframe,
284         AAadjust,
285         AAcursor,
286         AAgrid,
287         AAcolors,
288         AAannotation,
289         AAlabelscale,
290         AAfont,
291         AAxTickLocs,
292         AAyTickLocs,
293         AAzTickLocs,
294         AAxTickLabels,
295         AAyTickLabels,
296         AAzTickLabels,
297         interactionMode,
298         title,
299         renderMode,
300         buttonUpApprox,
301         buttonDownApprox,
302         buttonUpDensity,
303         buttonDownDensity) [instance: 1, cache: 1];
304     autoCamera =
305         AutoCamera(
306             object,
307             "front",
308             object,
309             resolution,
310             aspect,
311             [0,1,0],
312             perspective,
313             viewAngle,
314             backgroundColor) [instance: 1, cache: 1];
315     realCamera =
316         Camera(
317             to,
318             from,
319             width,
320             resolution,
321             aspect,
322             up,
323             perspective,
324             viewAngle,
325             backgroundColor) [instance: 1, cache: 1];
326     coloredDefaultCamera = 
327          UpdateCamera(defaultCamera,
328             background=backgroundColor) [instance: 1, cache: 1];
329     nullDefaultCamera =
330         Inquire(defaultCamera,
331             "is null + 1") [instance: 1, cache: 1];
332     resetCamera =
333         Switch(
334             nullDefaultCamera,
335             coloredDefaultCamera,
336             autoCamera) [instance: 1, cache: 1];
337     resetNull = 
338         Inquire(
339             reset,
340             "is null + 1") [instance: 2, cache: 1];
341     reset =
342         Switch(
343             resetNull,
344             reset,
345             0) [instance: 2, cache: 1];
346     whichCamera =
347         Compute(
348             "($0 != 0 || $1 == 0) ? 1 : 2",
349             reset,
350             useVector) [instance: 1, cache: 1];
351     camera = Switch(
352             whichCamera,
353             resetCamera,
354             realCamera) [instance: 3, cache: 1];
355     AAobject =
356         AutoAxes(
357             object,
358             camera,
359             AAlabels,
360             AAticks,
361             AAcorners,
362             AAframe,
363             AAadjust,
364             AAcursor,
365             AAgrid,
366             AAcolors,
367             AAannotation,
368             AAlabelscale,
369             AAfont,
370             AAxTickLocs,
371             AAyTickLocs,
372             AAzTickLocs,
373             AAxTickLabels,
374             AAyTickLabels,
375             AAzTickLabels) [instance: 1, cache: 1];
376     switchAAenable = Compute("$0+1",
377              AAenable) [instance: 2, cache: 1];
378     object = Switch(
379              switchAAenable,
380              object,
381              AAobject) [instance:4, cache: 1];
382     SWapproximation_options =
383         Switch(
384             buttonState,
385             buttonUpApprox,
386             buttonDownApprox) [instance: 5, cache: 1];
387     SWdensity_options =
388         Switch(
389             buttonState,
390             buttonUpDensity,
391             buttonDownDensity) [instance: 6, cache: 1];
392     HWapproximation_options =
393         Format(
394             "%s,%s",
395             buttonDownApprox,
396             buttonUpApprox) [instance: 1, cache: 1];
397     HWdensity_options =
398         Format(
399             "%d,%d",
400             buttonDownDensity,
401             buttonUpDensity) [instance: 2, cache: 1];
402     switchRenderMode = Compute(
403              "$0+1",
404              renderMode) [instance: 3, cache: 1];
405     approximation_options = Switch(
406              switchRenderMode,
407             SWapproximation_options,
408              HWapproximation_options) [instance: 7, cache: 1];
409     density_options = Switch(
410              switchRenderMode,
411             SWdensity_options,
412             HWdensity_options) [instance: 8, cache: 1];
413     renderModeString = Switch(
414             switchRenderMode,
415             "software",
416             "hardware")[instance: 9, cache: 1];
417     object_tag = Inquire(
418             object,
419             "object tag")[instance: 3, cache: 1];
420     annoted_object =
421         Options(
422             object,
423             "send boxes",
424             0,
425             "cache",
426             1,
427             "object tag",
428             object_tag,
429             "ddcamera",
430             whichCamera,
431             "rendering approximation",
432             approximation_options,
433             "render every",
434             density_options,
435             "button state",
436             buttonState,
437             "rendering mode",
438             renderModeString) [instance: 1, cache: 1];
439     RECresNull =
440         Inquire(
441             RECresolution,
442             "is null + 1") [instance: 4, cache: 1];
443     ImageResolution =
444         Inquire(
445             camera,
446             "camera resolution") [instance: 5, cache: 1];
447     RECresolution =
448         Switch(
449             RECresNull,
450             RECresolution,
451             ImageResolution) [instance: 10, cache: 1];
452     RECaspectNull =
453         Inquire(
454             RECaspect,
455             "is null + 1") [instance: 6, cache: 1];
456     ImageAspect =
457         Inquire(
458             camera,
459             "camera aspect") [instance: 7, cache: 1];
460     RECaspect =
461         Switch(
462             RECaspectNull,
463             RECaspect,
464             ImageAspect) [instance: 11, cache: 1];
465     switchRECenable = Compute(
466           "$0 == 0 ? 1 : (($2 == $3) && ($4 == $5)) ? ($1 == 1 ? 2 : 3) : 4",
467             RECenable,
468             switchRenderMode,
469             RECresolution,
470             ImageResolution,
471             RECaspect,
472              ImageAspect) [instance: 4, cache: 1];
473     NoRECobject, RECNoRerenderObject, RECNoRerHW, RECRerenderObject = Route(switchRECenable, annoted_object);
474     Display(
475         NoRECobject,
476         camera,
477         where,
478         throttle) [instance: 1, cache: 1];
479     image =
480         Render(
481             RECNoRerenderObject,
482             camera) [instance: 1, cache: 1];
483     Display(
484         image,
485         NULL,
486         where,
487         throttle) [instance: 2, cache: 1];
488     WriteImage(
489         image,
490         RECfile,
491         RECformat) [instance: 1, cache: 1];
492     rec_where = Display(
493         RECNoRerHW,
494         camera,
495         where,
496         throttle) [instance: 1, cache: 0];
497     rec_image = ReadImageWindow(
498         rec_where) [instance: 1, cache: 1];
499     WriteImage(
500         rec_image,
501         RECfile,
502         RECformat) [instance: 1, cache: 1];
503     RECupdateCamera =
504         UpdateCamera(
505             camera,
506             resolution=RECresolution,
507             aspect=RECaspect) [instance: 2, cache: 1];
508     Display(
509         RECRerenderObject,
510         camera,
511         where,
512         throttle) [instance: 1, cache: 1];
513     RECRerenderObject =
514         ScaleScreen(
515             RECRerenderObject,
516             NULL,
517             RECresolution,
518             camera) [instance: 1, cache: 1];
519     image =
520         Render(
521             RECRerenderObject,
522             RECupdateCamera) [instance: 2, cache: 1];
523     WriteImage(
524         image,
525         RECfile,
526         RECformat) [instance: 2, cache: 1];
528 main_Image_2_in_1 = "Image_2";
529 main_Image_2_in_3 = "X24,,";
530 main_Image_2_in_4 = 1;
531 main_Image_2_in_5 = [0.459851 0.459851 0.459851];
532 main_Image_2_in_6 = [5.36756 3.53923 7.97489];
533 main_Image_2_in_7 = 5.08525;
534 main_Image_2_in_8 = 640;
535 main_Image_2_in_9 = 0.75;
536 main_Image_2_in_10 = [-0.0834371 0.940039 -0.330704];
537 main_Image_2_in_11 = NULL;
538 main_Image_2_in_12 = 0;
539 main_Image_2_in_13 = NULL;
540 main_Image_2_in_14 = 1;
541 main_Image_2_in_15 = NULL;
542 main_Image_2_in_16 = NULL;
543 main_Image_2_in_17 = NULL;
544 main_Image_2_in_18 = NULL;
545 main_Image_2_in_19 = 0;
546 main_Image_2_in_20 = NULL;
547 main_Image_2_in_21 = NULL;
548 main_Image_2_in_22 = NULL;
549 main_Image_2_in_23 = NULL;
550 main_Image_2_in_25 = NULL;
551 main_Image_2_in_26 = NULL;
552 main_Image_2_in_27 = NULL;
553 main_Image_2_in_28 = NULL;
554 main_Image_2_in_29 = NULL;
555 main_Image_2_in_30 = NULL;
556 main_Image_2_in_31 = NULL;
557 main_Image_2_in_32 = NULL;
558 main_Image_2_in_33 = NULL;
559 main_Image_2_in_34 = NULL;
560 main_Image_2_in_35 = NULL;
561 main_Image_2_in_36 = NULL;
562 main_Image_2_in_37 = NULL;
563 main_Image_2_in_38 = NULL;
564 main_Image_2_in_39 = NULL;
565 main_Image_2_in_40 = NULL;
566 main_Image_2_in_41 = "none";
567 main_Image_2_in_42 = NULL;
568 main_Image_2_in_43 = NULL;
569 main_Image_2_in_44 = NULL;
570 main_Image_2_in_45 = NULL;
571 main_Image_2_in_46 = NULL;
572 main_Image_2_in_47 = NULL;
573 main_Image_2_in_48 = NULL;
574 main_Image_2_in_49 = NULL;
575 Executive("product version 4 4 0");
576 $sync
577 main();