[PD] Drawing a sine function dynamically in Gem
Roman Haefeli
reduzent at gmail.com
Wed Apr 10 22:11:20 CEST 2013
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?
> >
> >
> > _______________________________________________
> > Pd-list at iem.at mailing list
> > UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
> >
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
More information about the Pd-list
mailing list