hello,

you just have to put the gemhead in the gemlist befor the glBegin.
see attachement.

cheers
c


Le 10/04/2013 22:11, Roman Haefeli a écrit :
On Mit, 2013-04-03 at 11:59 +0200, Cyrille Henry wrote:
hello,

you have lot's of solution to draw a sinus curve in Gem.

[...]

you can also do like in openGL : using GEMglBegin, GEMglVextex (many
of them thanks to an iterative loop), and GEMglEnd

I'm interested in understanding that approach. So far I was able to draw
a simple line:

[gemhead]
|
[GEMglBegin GL_LINES]
|
[GEMglVertex2d -2 -2]
|
[GEMglVertex2d 2 2]
|
[GEMglEnd]

But how are you creating an iterative loop out of this? I tried after
GEMglBegin:

[t a b a]
|    |   \
|    [20( \
|    |     \
|    [until]\
|    |       \
|    [gemlist ]
|    |          <- put the two [GEMglVertex2d] here.
|
[GEMglEnd]

However, this causes an error on every frame:
GL: invalid operation

What is the correct way to do this?

Roman



Le 02/04/2013 23:18, Alexandros Drymonitis a écrit :
I want to build this visual http://processing.org/learning/trig/ in Pd, but I 
want the sine curve to be drawn dynamically with every circle spin. It seems 
quite hard though.

I don't know which object would be best. I tried either [curve] but the 
parameters are way too many and I'm not sure if precision is really possible. 
Then I tried [square 0.008] in combination with [repeat] but also doesn't work.
Anyone knows how to do this?


_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list



_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Attachment: gl_lines.pd
Description: application/puredata

_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to