I've found a trick to use one gemhead and one gem-geo-object to render multiple instances of the same geo. This could be very usefull to create complex computer-generated gem scenes.
Like it is now, I hade to create an obscure mess with [prepend list] [l] and [$1 $2 $3(
to do with a gemList what[float] does for floats and [symbol] for symbols. Without the [prepend list], [l] does not want to take it, and without the [$1 $2 $3(, separator does not like it.
It works, but it crashes every time I stop the rendering. Probably something to do with fixing the gemList data to 3 atoms, which isn't always the case. Or is this trick a huge can of worms that will make every gem object buggy?
Is there a solution or workaround for this? A specific [gemlist] container object would be nice for the next gem release (hint :).
In attachment there is a demo patch ("gem-loop-test.pd") that shows animating 3D lissajous figures consisting out of 256 spheres. Anyone knows a nice hack to connect the spheres with tubes?
thanks, j#|@
#N canvas 136 152 749 535 12; #X obj 74 177 until 3; #X obj 39 42 gemhead; #X obj 39 86 prepend list; #X msg 20 276 $1 $2 $3; #X obj 76 200 f; #X obj 105 201 + 1; #X msg 109 155 0; #X obj 74 133 t b b; #X obj 76 225 t b f f f; #X obj 20 320 translateXYZ; #X obj 120 272 tabread y; #X obj 143 249 tabread z; #X obj 98 295 tabread x; #X obj 20 253 l; #X obj 39 108 t l b; #X obj 20 298 separator; #X msg 39 365 draw line; #X obj 20 411 sphere 0.1 8; #X floatatom 132 390 5 0 0 0 - - -; #X obj 256 151 f; #X obj 256 217 * 6.283; #X obj 256 277 * 3; #X obj 256 343 tabwrite x; #X obj 342 342 tabwrite y; #X obj 427 342 tabwrite z; #X obj 256 46 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X obj 256 299 sin; #X obj 342 298 sin; #X obj 427 298 sin; #X obj 39 64 rotateXYZ; #X floatatom 124 31 5 0 0 0 - - -; #X floatatom 275 256 5 0 0 0 - - -; #X obj 314 151 % 102400; #X floatatom 385 255 5 0 0 0 - - -; #X floatatom 470 255 5 0 0 0 - - -; #X obj 256 173 t f f; #X msg 47 387 draw fill; #X msg 33 343 draw point; #X obj 256 321 * 2; #X obj 342 320 * 2; #X obj 427 320 * 2; #X obj 285 151 + 1; #X obj 256 85 t b b; #X obj 256 129 until 3; #X obj 256 63 metro 40; #X obj 522 232 gemwin; #X msg 547 73 create; #X msg 547 95 1; #X msg 547 117 0; #X msg 547 139 reset; #X msg 547 161 destroy; #X msg 547 203 lighting $1; #X obj 547 186 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X msg 547 51 dimen 640 480; #X text 631 477 j#|@2004; #X text 10 -12 gem-loop-test: test if gem behaves if you use it to iterate geos; #X msg 256 107 256; #X obj 255 378 table x 256; #X obj 255 401 table y 256; #X obj 255 424 table z 256; #X obj 495 307 % 256; #X obj 256 195 / 256; #X floatatom 193 98 5 0 0 0 - - -; #X obj 342 276 * 4.01; #X obj 427 276 * 5.03; #X obj 174 120 * 0; #X msg 74 155 256; #X connect 0 0 4 0; #X connect 1 0 29 0; #X connect 2 0 14 0; #X connect 3 0 15 0; #X connect 4 0 5 0; #X connect 4 0 8 0; #X connect 5 0 4 1; #X connect 6 0 4 1; #X connect 7 0 66 0; #X connect 7 1 6 0; #X connect 8 0 13 0; #X connect 8 1 12 0; #X connect 8 2 10 0; #X connect 8 3 11 0; #X connect 9 0 17 0; #X connect 10 0 9 2; #X connect 11 0 9 3; #X connect 12 0 9 1; #X connect 13 0 3 0; #X connect 14 0 13 1; #X connect 14 1 7 0; #X connect 15 0 9 0; #X connect 16 0 17 0; #X connect 18 0 17 1; #X connect 19 0 35 0; #X connect 19 0 41 0; #X connect 20 0 21 0; #X connect 20 0 63 0; #X connect 20 0 64 0; #X connect 21 0 26 0; #X connect 25 0 44 0; #X connect 26 0 38 0; #X connect 27 0 39 0; #X connect 28 0 40 0; #X connect 29 0 2 0; #X connect 30 0 29 2; #X connect 31 0 21 1; #X connect 32 0 19 1; #X connect 33 0 63 1; #X connect 34 0 64 1; #X connect 35 0 61 0; #X connect 35 1 60 0; #X connect 36 0 17 0; #X connect 37 0 17 0; #X connect 38 0 22 0; #X connect 39 0 23 0; #X connect 40 0 24 0; #X connect 41 0 32 0; #X connect 42 0 56 0; #X connect 43 0 19 0; #X connect 44 0 42 0; #X connect 46 0 45 0; #X connect 47 0 45 0; #X connect 48 0 45 0; #X connect 49 0 45 0; #X connect 50 0 45 0; #X connect 51 0 45 0; #X connect 52 0 51 0; #X connect 53 0 45 0; #X connect 56 0 43 0; #X connect 60 0 24 1; #X connect 60 0 23 1; #X connect 60 0 22 1; #X connect 61 0 20 0; #X connect 61 0 65 0; #X connect 62 0 65 1; #X connect 63 0 27 0; #X connect 64 0 28 0; #X connect 65 0 30 0; #X connect 66 0 0 0;