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