[PD] GEM : How to create vertex dynamically? / drawing 3D lines?

B. Bogart ben at ekran.org
Tue Mar 29 17:42:02 CEST 2005

Hi Georges.

Gem has not been often used for "drawing" Until vertex arrays (still not
released) all objects were static primatives with some control. I have a
couple of ideas. You can look at the "curve" object that simply creates
a spline curve of up to 5 control points. I guess you could have to use
a bunch of these and overlap them by two points to make sure they are
smooth. This could be problematic though. Also you could try using
curve3d. curve3d is a 3d surface (matrix) of control points. You could
make the matrix very wide and not very tall 2x100 or 1x100 points. Then
you would have up to 100 control points to use for drawing, but these
are there to start with, you cannot add points as you go. Maybe this
would be a feature for curve3d? the ability to add points on the fly?

Maybe the "curve" object could be modified to allow more points, but
each point has an inlet so the way you use it would have to change...

I've CCed the gem developers to see if they have any ideas.


Georges Babouche wrote:
> Dear list,
> I couldn't find anyone answering my question
> on the list...  (sob!) Given the traffic these days,
> I can see various reason for this...
> 1- Nobody understood what I meant
> 2- Nobody ever had this problem
> 3- Noobody ever solved this problem within PD
> 4- My mail just got drowned in friday's mail rush
> 5-The question is too hard and nobody wanted
>     to waste time answering this.
> 6-The question is too easy and nobody wanted
>     to waste time answering this.
> 7- other?
> still searching ... waiting for a kind GEM/OpenGL guru
> to help me find sleep again
> many thanks!
> vinc (eyes wide shot)
> --- Georges Babouche <infopapier at yahoo.com.sg> wrote:
>>Date: Fri, 25 Mar 2005 20:43:22 +0800 (CST)
>>From: Georges Babouche <infopapier at yahoo.com.sg>
>>Subject: GEM : How to create vertex dynamically? /
>>drawing 3D lines?
>>To: pd-list at iem.at
>>I would like to be able to draw lines
>>in a 3D space with a Wacom pen tablet,
>>and I cannot find any solution for creating
>>the vertex.
>>I had managed to do that with Jitter
>>quite simply with the sketch object
>>and commands "moveto" "lineto".
>>But it seems that there is no way to
>>dynamically add new vertex and link them to
>>get a line (bezier or even a simple).
>>I thought I could it with VertexArrays
>>but the function handling pointers
>>are not (?) accessible in GEM.
>>Example :
>>glEnableClientState(GLenum array)
>> is instanciated correctly but
>>glVertexPointer(GLint size, (...),  const GLvoid
>>is not.
>>If this is actually implemented, are there
>>any reference guide for how one should type
>>the names and command?
>>Something like GLdefine for pointers?
>>I guess dynamically instanciating new
>>[GEMglVertex3f] objects every time I get
>>a message from the tablet is not the solution.
>>(Well, I hope too ;-)
>>The operation seems quite common though...
>>I guess that some people must have done
>>similar stuff, if the GEMtablet exists...
>>Did I miss a sooooo simple function/command?
>>Are there any objects/patchs already doin this?
>>Any patch repository for GEM could be nice...
>>Last: since I would like to be able to deform
>>these lines after drawing them, maybe
>>my solution is not the best... (and sure isn't
>>at the present time)
>>Thanks for any helpful advice!
>>(still RTFM and STFW for now)
>>Do You Yahoo!?
>>Download the latest ringtones, games, and more!
> __________________________________________________
> Do You Yahoo!?
> Download the latest ringtones, games, and more!
> http://sg.mobile.yahoo.com
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20050329/9ad62b52/attachment.pgp>

More information about the Pd-list mailing list