hi list,
i want to use a closed cylinder. so i made an abstraction cylinder_closed.pd. but it seems not to be very fast and it can't be used with [repeat n]. is there a better way to approach this?
Max Neupert wrote:
hi list,
i want to use a closed cylinder. so i made an abstraction cylinder_closed.pd. but it seems not to be very fast and it can't be used with [repeat n]. is there a better way to approach this?
attached is a version that is both [repeat]able and fast, but unfortunately it won't run on your system ;-)
your patch is so slow, because both [cylinder] and [disk] are slow (because they don't use display-lists), so you cannot gain much speed that way. chris clepper kept stating that we need a mechanism to allow the user to build their own display-lists to speed things up. i always thought that this could be done with the openGL-wrapper-objects, but appearantly 2 crucial objects were missing [GEMglNewList] and [GEMglEndList]; i have added them to the CVS now (and used them already in the patch ;-)) so what i have done in the patch is create a display-list of the closed cyclinder and call that instead of the objects.
so my patch is another good example of what the openGL-wrapper is for and how to use it.
within the ccylinder-abstraction there is a solitaire subpatch [pd closedcylinder] which does not depend on the openGL-wrapper at all. it is still slow, but you can use it as a normal Gem-object (e.g. with [repeat])
hope this helps
mfg.asd.r IOhannes
Am 05.04.2005 um 13:06 schrieb IOhannes m zmoelnig:
Max Neupert wrote:
hi list, i want to use a closed cylinder. so i made an abstraction cylinder_closed.pd. but it seems not to be very fast and it can't be used with [repeat n]. is there a better way to approach this?
attached is a version that is both [repeat]able and fast,
hi IOhannes, thanks for your help, i think you forgot to attach the patch?
but unfortunately it won't run on your system ;-)
but i guess using the cvs-gem it would run?
your patch is so slow, because both [cylinder] and [disk] are slow (because they don't use display-lists), so you cannot gain much speed that way. chris clepper kept stating that we need a mechanism to allow the user to build their own display-lists to speed things up. i always thought that this could be done with the openGL-wrapper-objects, but appearantly 2 crucial objects were missing [GEMglNewList] and [GEMglEndList]; i have added them to the CVS now (and used them already in the patch ;-)) so what i have done in the patch is create a display-list of the closed cyclinder and call that instead of the objects.
so my patch is another good example of what the openGL-wrapper is for and how to use it.
i'll try to learn as much as i can about it...
within the ccylinder-abstraction there is a solitaire subpatch [pd closedcylinder] which does not depend on the openGL-wrapper at all. it is still slow, but you can use it as a normal Gem-object (e.g. with [repeat])
danke.
Max Neupert wrote:
Am 05.04.2005 um 13:06 schrieb IOhannes m zmoelnig:
Max Neupert wrote:
hi list, i want to use a closed cylinder. so i made an abstraction cylinder_closed.pd. but it seems not to be very fast and it can't be used with [repeat n]. is there a better way to approach this?
attached is a version that is both [repeat]able and fast,
hi IOhannes, thanks for your help, i think you forgot to attach the patch?
but unfortunately it won't run on your system ;-)
but i guess using the cvs-gem it would run?
yes; but since i just checked it in, it will take some time till sourceforge has synched the anonymous-cvs with the dev-cvs. (some hours)
mfg.asdr IOhannes
IOhannes m zmoelnig wrote: .... forgot the attachment....
mfg.adsr. IOhannes
#N canvas 232 98 791 542 10; #X obj 37 279 inlet gemlist; #X obj 37 384 outlet gemlist; #X obj 419 180 inlet size; #X obj 505 180 inlet slice; #N canvas 0 0 450 300 closedcylinder 0; #X obj 37 9 inlet gemlist; #X obj 301 73 loadbang; #X obj 37 112 cylinder; #X obj 290 30 inlet size; #X obj 376 30 inlet slice; #X obj 261 118 f $1; #X obj 347 119 f $2; #X obj 301 92 t b b; #X obj 135 93 t f f f; #X obj 110 118 t f f f; #X obj 168 118 t f f; #X obj 37 246 disk 1; #X obj 37 199 disk 1; #X obj 185 72 t f f; #X obj 152 47 t f f; #X obj 37 173 translate 1 0 0 1; #X obj 37 223 translate 1 0 0 -2; #X obj 261 141 t f f; #X obj 261 161 > 0; #X obj 261 181 select 1; #X obj 261 200 f; #X obj 347 141 t f f; #X obj 347 161 > 0; #X obj 347 181 select 1; #X obj 347 200 f; #X connect 0 0 2 0; #X connect 1 0 7 0; #X connect 2 0 15 0; #X connect 3 0 20 0; #X connect 4 0 24 0; #X connect 5 0 17 0; #X connect 6 0 21 0; #X connect 7 0 5 0; #X connect 7 1 6 0; #X connect 8 0 2 1; #X connect 8 1 9 0; #X connect 8 2 10 0; #X connect 9 0 15 1; #X connect 9 1 16 1; #X connect 10 0 12 1; #X connect 10 1 11 1; #X connect 12 0 16 0; #X connect 13 0 12 2; #X connect 13 1 11 2; #X connect 14 0 2 2; #X connect 14 1 13 0; #X connect 15 0 12 0; #X connect 16 0 11 0; #X connect 17 0 18 0; #X connect 17 1 20 1; #X connect 18 0 19 0; #X connect 19 0 20 0; #X connect 20 0 8 0; #X connect 21 0 22 0; #X connect 21 1 24 1; #X connect 22 0 23 0; #X connect 23 0 24 0; #X connect 24 0 14 0; #X restore 186 467 pd closedcylinder; #X obj 186 221 GEMglGenLists 1; #X obj 156 398 GEMglNewList; #X obj 37 322 GEMglCallList; #N canvas 0 0 450 300 once 0; #X obj 91 62 inlet; #X obj 91 266 outlet; #X obj 91 150 spigot 1; #X obj 91 175 t a b; #X msg 121 197 0; #X obj 298 57 inlet open; #X obj 298 92 t b; #X msg 142 128 1; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 3 1 4 0; #X connect 4 0 2 1; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 2 1; #X restore 186 199 pd once; #N canvas 0 0 450 300 once 0; #X obj 91 62 inlet; #X obj 91 266 outlet; #X obj 91 150 spigot 1; #X obj 91 175 t a b; #X msg 121 197 0; #X obj 298 57 inlet open; #X obj 298 92 t b; #X msg 142 128 1; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 3 1 4 0; #X connect 4 0 2 1; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 2 1; #X restore 156 372 pd once; #X obj 419 201 t b f; #X obj 505 202 t b f; #X obj 235 354 loadbang; #X obj 235 373 GLdefine GL_COMPILE; #X msg 230 178 bang; #X obj 156 488 GEMglEndList; #X obj 156 425 t a a; #X obj 186 446 separator; #X obj 156 113 gemhead 1; #X obj 316 267 t b; #X obj 156 138 t a a; #X obj 286 241 t f b; #X obj 165 268 t f f; #X msg 305 343 bang; #N canvas 0 0 450 300 closedcylinder 0; #X obj 37 9 inlet gemlist; #X obj 37 274 outlet gemlist; #X obj 301 73 loadbang; #X obj 37 112 cylinder; #X obj 290 30 inlet size; #X obj 376 30 inlet slice; #X obj 261 118 f $1; #X obj 347 119 f $2; #X obj 301 92 t b b; #X obj 135 93 t f f f; #X obj 110 118 t f f f; #X obj 168 118 t f f; #X obj 67 246 disk 1; #X obj 67 199 disk 1; #X obj 185 72 t f f; #X obj 152 47 t f f; #X obj 37 131 t a a; #X obj 67 151 separator; #X obj 67 173 translate 1 0 0 1; #X obj 67 223 translate 1 0 0 -2; #X obj 261 141 t f f; #X obj 261 161 > 0; #X obj 261 181 select 1; #X obj 261 200 f; #X obj 347 141 t f f; #X obj 347 161 > 0; #X obj 347 181 select 1; #X obj 347 200 f; #X connect 0 0 3 0; #X connect 2 0 8 0; #X connect 3 0 16 0; #X connect 4 0 23 0; #X connect 5 0 27 0; #X connect 6 0 20 0; #X connect 7 0 24 0; #X connect 8 0 6 0; #X connect 8 1 7 0; #X connect 9 0 3 1; #X connect 9 1 10 0; #X connect 9 2 11 0; #X connect 10 0 18 1; #X connect 10 1 19 1; #X connect 11 0 13 1; #X connect 11 1 12 1; #X connect 13 0 19 0; #X connect 14 0 13 2; #X connect 14 1 12 2; #X connect 15 0 3 2; #X connect 15 1 14 0; #X connect 16 0 1 0; #X connect 16 1 17 0; #X connect 17 0 18 0; #X connect 18 0 13 0; #X connect 19 0 12 0; #X connect 20 0 21 0; #X connect 20 1 23 1; #X connect 21 0 22 0; #X connect 22 0 23 0; #X connect 23 0 9 0; #X connect 24 0 25 0; #X connect 24 1 27 1; #X connect 25 0 26 0; #X connect 26 0 27 0; #X connect 27 0 15 0; #X restore 469 494 pd closedcylinder; #X text 346 477 this is a version without the openGL-wrapper; #X text 360 491 it is slower::; #X text 48 21 this is an example of how to use Gem's openGL-wrapper-objects to speed up things; #X connect 0 0 7 0; #X connect 2 0 10 0; #X connect 3 0 11 0; #X connect 5 1 21 0; #X connect 6 0 16 0; #X connect 7 0 1 0; #X connect 8 0 5 0; #X connect 9 0 6 0; #X connect 10 0 19 0; #X connect 10 1 4 1; #X connect 11 0 19 0; #X connect 11 1 4 2; #X connect 12 0 13 0; #X connect 13 0 6 2; #X connect 14 0 8 1; #X connect 16 0 15 0; #X connect 16 1 17 0; #X connect 17 0 4 0; #X connect 18 0 20 0; #X connect 19 0 9 1; #X connect 20 0 9 0; #X connect 20 1 8 0; #X connect 21 0 22 0; #X connect 21 1 19 0; #X connect 22 0 7 1; #X connect 22 1 6 1; #X connect 23 0 13 0;