Hello,
According to the GEM manual, there are "curve" and "polygon" objects in GEM. However, I'm not able to create them. Do they exist?
Related question, how do I just draw some lines in GEM, is that possible? Do I need the openGL wrappers, and if so, does anyone know an easy openGL tutorial that might get me started? Or does someone have a really simple example patch they could send?
Thanks, David
Is the attached patch working? patco
--- David Powers cyborgk@nocturnalnoize.com a écrit :
Hello,
According to the GEM manual, there are "curve" and "polygon" objects in GEM. However, I'm not able to create them. Do they exist?
Related question, how do I just draw some lines in GEM, is that possible? Do I need the openGL wrappers, and if so, does anyone know an easy openGL tutorial that might get me started? Or does someone have a really simple example patch they could send?
Thanks, David
___________________________________________________________________________ Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international. Téléchargez sur http://fr.messenger.yahoo.com
#N canvas 65 18 762 461 10; #X text 54 30 Class: geometric object; #X text 475 39 Example:; #X obj 7 65 cnv 15 450 100 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 8 216 cnv 15 450 180 empty empty empty 20 12 0 14 -233017 -66577 0; #X text 9 221 Inlets:; #X obj 8 176 cnv 15 450 30 empty empty empty 20 12 0 14 -195568 -66577 0; #X text 17 175 Arguments:; #X text 452 8 GEM object; #X text 27 233 Inlet 1: gemlist; #X text 9 358 Outlets:; #X text 21 371 Outlet 1: gemlist; #X obj 469 58 cnv 15 200 295 empty empty empty 20 12 0 14 -228992 -66577 0; #X obj 568 359 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 0; #N canvas 0 0 450 300 gemwin 0; #X obj 132 136 gemwin; #X obj 67 89 outlet; #X obj 67 10 inlet; #X obj 67 41 route create; #X msg 67 70 set destroy; #X msg 142 68 set create; #X msg 132 112 create , 1; #X msg 198 112 destroy , reset; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 3 0 6 0; #X connect 3 1 5 0; #X connect 3 1 7 0; #X connect 4 0 1 0; #X connect 5 0 1 0; #X connect 6 0 0 0; #X connect 7 0 0 0; #X restore 573 398 pd gemwin; #X msg 573 379 create; #X text 569 358 Create window:; #X obj 474 112 cnv 15 190 200 empty empty empty 20 12 0 14 -85973 -66577 0; #X obj 521 319 cnv 15 100 30 empty empty empty 20 12 0 14 -24198 -66577 0; #X text 21 138 Each (additional) inlet will accept an X Y Z point which is where the control point will be.; #X text 28 323 Inlet 2: list: 3(XYZ) float values; #X text 28 344 Inlet N: list: 3(XYZ) float values; #X text 52 330 ...; #X text 33 14 Synopsis: [curve]; #X text 7 69 Description: Renders a bezier-curve; #X text 63 187 number of control-points of the curve (mandatory); #X text 27 247 Inlet 1: message: draw [line|linestrip|fill|point|tri|tristrip|trifan|quad|quadstrip] ; #X text 22 88 [curve] creates a bezier curve. The initial argument is the number of control-points of the curve. There is no maximum number of control-points.; #X text 27 306 Inlet 1: message: res <int> : interpolation-resolution(30) ; #X text 27 293 Inlet 1: message: width <int> : line-width(1); #X obj 596 233 cnv 15 65 75 empty empty empty 20 12 0 14 -24198 -66577 0; #X msg 479 163 draw line; #X msg 479 118 draw fill; #X msg 479 140 draw point; #X obj 537 64 gemhead; #X msg 585 115 1 1 0; #X msg 593 135 1 -1 0; #X floatatom 605 196 5 0 0 0 - - -; #X msg 603 175 -2 1 0; #X msg 599 155 -1 -1 -3; #X msg 479 183 draw linestrip; #X msg 479 203 draw tri; #X msg 479 225 draw tristrip; #X msg 478 248 draw trifan; #X msg 478 269 draw quad; #X msg 478 291 draw quadstrip; #X obj 537 88 rotateXYZ; #X floatatom 595 65 5 0 0 0 - - -; #X obj 537 326 curve 5; #X obj 608 89 loadbang; #X floatatom 599 237 5 0 10 0 - - -; #X msg 599 253 width $1; #X floatatom 600 274 5 0 100 0 - - -; #X msg 600 291 res $1; #X msg 605 213 $1 $1 $1; #X connect 13 0 14 0; #X connect 14 0 13 0; #X connect 30 0 47 0; #X connect 31 0 47 0; #X connect 32 0 47 0; #X connect 33 0 45 0; #X connect 34 0 47 1; #X connect 35 0 47 2; #X connect 36 0 53 0; #X connect 37 0 47 4; #X connect 38 0 47 3; #X connect 39 0 47 0; #X connect 40 0 47 0; #X connect 41 0 47 0; #X connect 42 0 47 0; #X connect 43 0 47 0; #X connect 44 0 47 0; #X connect 45 0 47 0; #X connect 46 0 45 1; #X connect 46 0 45 3; #X connect 48 0 34 0; #X connect 49 0 50 0; #X connect 50 0 47 0; #X connect 51 0 52 0; #X connect 52 0 47 0; #X connect 53 0 47 5;
Never mind, I guess I was trying to create it without an argument, because I was going to check the arguments AFTER I created it. But without the argument PD won't create it (though I think there should be some default argument built in). ~David
David Powers wrote:
Hello,
According to the GEM manual, there are "curve" and "polygon" objects in GEM. However, I'm not able to create them. Do they exist?
Related question, how do I just draw some lines in GEM, is that possible? Do I need the openGL wrappers, and if so, does anyone know an easy openGL tutorial that might get me started? Or does someone have a really simple example patch they could send?
Thanks, David
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
So, follow up question:
I can make lines with [polygon 2] - easy enough. But, there is one thing I still don't get - what are GEM coordinates supposed to represent? The length of "1" or "4" in GEM seems arbitrary. I'm sure there's a logical explanation though. I was thinking of trying to sketch out some weird things, and render them with GEM, but understanding the coordinate system would help a lot!
Also, still interested in the OpenGL tutorial - are there any good reasons to use OpenGL wrappers over built in GEM functions? What might I be able to do better than GEM, or what is missing in GEM that these wrappers have?
Thanks, David
David Powers wrote:
Never mind, I guess I was trying to create it without an argument, because I was going to check the arguments AFTER I created it. But without the argument PD won't create it (though I think there should be some default argument built in). ~David
David Powers wrote:
Hello,
According to the GEM manual, there are "curve" and "polygon" objects in GEM. However, I'm not able to create them. Do they exist?
Related question, how do I just draw some lines in GEM, is that possible? Do I need the openGL wrappers, and if so, does anyone know an easy openGL tutorial that might get me started? Or does someone have a really simple example patch they could send?
Thanks, David
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hallo, David Powers hat gesagt: // David Powers wrote:
I can make lines with [polygon 2] - easy enough. But, there is one thing I still don't get - what are GEM coordinates supposed to represent?
Whatever you want them to represent. The lengths in Gem don't have a unit.
The length of "1" or "4" in GEM seems arbitrary.
In a way it is. However Gem defaults for objects to be of size 1 a lot: Cubes have length 1, spheres have radius 1 etc. To be able to see them fully, it's best to step back a bit, that's why the viewport in Gem is the way it is. You can of course change it with the "view" message.
Frank Barknecht _ ______footils.org_ __goto10.org__
Gem coords really only represent distances relative to the window aspect ratio.
0,0,0 is in the middle, -4,-4,0 is the bottom left corner 4,4,0 is the upper right corner. The camera is at 0,0,4...
That is for a square window.
The height of a gemwindow is always 8 units, -4 to 4, but depending on the aspect ratio of the window the number of units wide changes. for a 2:1 window the left edge is -8 and the right 8. For a 4:3 window the left is -5.333 and the right 5.333
try the tutorial at www.ekran.org/pd
..b.
David Powers wrote:
So, follow up question:
I can make lines with [polygon 2] - easy enough. But, there is one thing I still don't get - what are GEM coordinates supposed to represent? The length of "1" or "4" in GEM seems arbitrary. I'm sure there's a logical explanation though. I was thinking of trying to sketch out some weird things, and render them with GEM, but understanding the coordinate system would help a lot!
Also, still interested in the OpenGL tutorial - are there any good reasons to use OpenGL wrappers over built in GEM functions? What might I be able to do better than GEM, or what is missing in GEM that these wrappers have?
Thanks, David
David Powers wrote:
Never mind, I guess I was trying to create it without an argument, because I was going to check the arguments AFTER I created it. But without the argument PD won't create it (though I think there should be some default argument built in). ~David
David Powers wrote:
Hello,
According to the GEM manual, there are "curve" and "polygon" objects in GEM. However, I'm not able to create them. Do they exist?
Related question, how do I just draw some lines in GEM, is that possible? Do I need the openGL wrappers, and if so, does anyone know an easy openGL tutorial that might get me started? Or does someone have a really simple example patch they could send?
Thanks, David
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Just to make things clear, GEM uses nothing but standard OpenGL API functions. We didn't make the coordinate system, so you have the same vague GL dimensions as any other GL based app around. Feel free to change the view perspective with the 'perspec' message detailed in the gemwin help patch (in the viewing subpatch).
cgc
Okay, THIS is exactly what I needed to know. Very helpful! I couldn't figure out why the hell my width was 5 and a fraction, but now, that makes perfect sense (even if it's a little arbitrary, I see the logic in it). I'll definitely check the tutorials.
The funny thing is, without knowing many things, I still had no problem creating a live video/animation program which ran "good enough" to do live visuals at a party in Chicago. However, I skipped things that seemed weird or didn't work, to figure out later...
I'm definitely going to at least keep doing generative stuff in GEM. Looks like video in GEM, on PC isn't much of an option right now, I really need AVI's, cus I use Virtual Dub to do the edits. Unless someone knows of a simple AVI-QT converter, because I don't have any easy way to make QuickTime movies... Well, I'll try the 0.87 GEM to see if it is better, before I give up.
~David
Gem coords really only represent distances relative to the window aspect ratio.
0,0,0 is in the middle, -4,-4,0 is the bottom left corner 4,4,0 is the upper right corner. The camera is at 0,0,4...
That is for a square window.
The height of a gemwindow is always 8 units, -4 to 4, but depending on the aspect ratio of the window the number of units wide changes. for a 2:1 window the left edge is -8 and the right 8. For a 4:3 window the left is -5.333 and the right 5.333
try the tutorial at www.ekran.org/pd
..b.