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