comparison extra/fpl/deprecated/FPL2pdeshowmesh.net @ 12671:20e8aca47b2c octave-forge

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