03b_ev_example_360_degree_livecam.pd 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. #N canvas 440 22 922 756 10;
  2. #X declare -path . -path .. -path data -path ../data -path ev-in -path
  3. ../ev-in -path ev-main -path ../ev-main -path ev-pano -path ../ev-pano
  4. -path ev-pro -path ../ev-pro -path libs/gil -path ../libs/gil -path
  5. libs/kollabs -path ../libs/kollabs -path media -path ../media -path
  6. ev-glsl -path ../ev-glsl;
  7. #X obj 18 106 cnv 15 650 400 empty empty CAMERA 20 12 0 14 -204786
  8. -66577 0;
  9. #X obj 18 20 cnv 15 650 16 empty empty example:_360_DEGREE_LIVECAM
  10. 20 8 0 14 -233017 -66577 0;
  11. #X obj 508 45 cnv 15 160 50 empty empty INITIALISATIONS 20 12 0 14
  12. -261682 -66577 0;
  13. #N canvas 407 127 535 539 init 0;
  14. #X obj 56 92 loadbang;
  15. #X obj 44 -23 cnv 15 400 100 empty empty IMPORTANT 20 12 0 14 -261234
  16. -66577 0;
  17. #X text 49 -3 Such a declare object should always be in the main patch
  18. of your project \, to set the pathes to the abstractions.;
  19. #X text 159 160 load the preset file on startup:;
  20. #X text 66 272 Recall scene '0' from the loaded preset file \, and
  21. load the still image files.;
  22. #X obj 158 43 ev-main/ev_declare;
  23. #X obj 56 134 t b b;
  24. #X obj 83 158 del 1000;
  25. #X obj 56 231 del 3000;
  26. #X text 127 93 The DATA STORAGE SYSTEM will be explained in a later
  27. example.;
  28. #X msg 56 308 \; /ds/0/scene 0 \;;
  29. #X msg 83 179 \; /ds/0/loadfile ../../data/ev_example_360_degree_livecam.txt
  30. \;;
  31. #X text 166 226 (pathes relative to "./libs/kollabs");
  32. #X connect 0 0 6 0;
  33. #X connect 6 0 8 0;
  34. #X connect 6 1 7 0;
  35. #X connect 7 0 11 0;
  36. #X connect 8 0 10 0;
  37. #X restore 602 74 pd init;
  38. #X text 523 72 look inside:;
  39. #X text 177 653 This example uses scene 0 of;
  40. #X obj 18 625 ev_storage;
  41. #X obj 18 520 ev_gemwin;
  42. #X obj 26 335 ev_cam 0;
  43. #X obj 26 169 gemhead;
  44. #X msg 238 225 enumerate;
  45. #X msg 244 257 dialog;
  46. #X msg 212 185 device 0;
  47. #N canvas 109 147 570 420 device 0;
  48. #X obj 204 60 cnv 20 20 20 empty \$0-open-canvas 0 4 10 0 16 -233017
  49. -1 0;
  50. #X obj 60 61 hradio 18 1 0 8 empty empty empty 0 -6 0 8 -225271 -1
  51. -1 0;
  52. #X obj 60 13 inlet;
  53. #X msg 160 254 label \$1;
  54. #X obj 160 232 makefilename %d;
  55. #X obj 60 108 int;
  56. #X obj 60 337 outlet;
  57. #X obj 160 277 send \$0-open-canvas;
  58. #X msg 130 170 device \$1;
  59. #X obj 60 130 t b f;
  60. #X obj 130 192 t a a;
  61. #X obj 130 298 list prepend set;
  62. #X obj 130 320 list trim;
  63. #X obj 160 211 route device;
  64. #X obj 130 116 loadbang;
  65. #X msg 130 138 0;
  66. #X connect 1 0 5 0;
  67. #X connect 2 0 1 0;
  68. #X connect 3 0 7 0;
  69. #X connect 4 0 3 0;
  70. #X connect 5 0 9 0;
  71. #X connect 8 0 10 0;
  72. #X connect 9 0 6 0;
  73. #X connect 9 1 8 0;
  74. #X connect 10 0 11 0;
  75. #X connect 10 1 13 0;
  76. #X connect 11 0 12 0;
  77. #X connect 12 0 6 0;
  78. #X connect 13 0 4 0;
  79. #X connect 14 0 15 0;
  80. #X connect 15 0 8 0;
  81. #X coords 0 -1 1 1 165 20 1 60 60;
  82. #X restore 212 161 pd device;
  83. #X obj 199 285 t a;
  84. #X msg 199 123 dimen 1920 1080;
  85. #X obj 543 425 r /ev/360/0/dimen/y;
  86. #X obj 413 425 r /ev/360/0/dimen/x;
  87. #X floatatom 413 447 5 0 0 0 - - -;
  88. #X floatatom 543 447 5 0 0 0 - - -;
  89. #X text 414 401 Get dimensions:;
  90. #X text 289 260 (If available. Use this on OSX);
  91. #X floatatom 59 229 5 0 0 0 - - -;
  92. #X floatatom 92 229 5 0 0 0 - - -;
  93. #X text 47 209 Scale image:;
  94. #X text 312 20 (c)2012 Peter Venus & Marian Weger /EXTENDED VIEW toolkit/
  95. ;
  96. #X text 387 539 <-- create gem window;
  97. #X text 180 635 Presets are located in the "./data" folder;
  98. #X text 177 666 "ev_example_360_degree_livecam.txt";
  99. #X obj 26 401 ev_360 0;
  100. #X text 229 299 See [pix_video-help] for more information.;
  101. #X obj 18 45 cnv 15 360 50 empty empty Important_note: 20 12 0 14 -261234
  102. -1 0;
  103. #X text 32 67 This example needs a webcam and a cone-shaped mirror
  104. in front of it \, to get a 360 degree image in realtime.;
  105. #X obj 26 260 scaleXYZ 1 1 1;
  106. #X connect 8 0 29 0;
  107. #X connect 9 0 33 0;
  108. #X connect 10 0 14 0;
  109. #X connect 11 0 14 0;
  110. #X connect 12 0 14 0;
  111. #X connect 13 0 12 0;
  112. #X connect 14 0 8 1;
  113. #X connect 15 0 14 0;
  114. #X connect 16 0 19 0;
  115. #X connect 17 0 18 0;
  116. #X connect 22 0 33 1;
  117. #X connect 23 0 33 2;
  118. #X connect 33 0 8 0;
  119. #X coords 0 756 1 755 85 60 0;