drawing a simple shape

resevoirfrog's picture

sorry if i'm being dense, but how would i go about defining, say, three points and filling them with colour? yes, i mean the same as that code from the eighties :)

rounded rectangle is just not what i'm after.

then filling that shape with video input would be the next step, i guess.

thanks.

cybero's picture
Re: drawing a simple shape

GL Tools example composition GLTools-structure-trianglesubtract is a pretty good example of how to create a simple triangle using JavaScript, with segments set to only 3. There's also an interesting, more configurable JS based example posted on this thread http://kineme.net/forum/Discussion/DevelopingCompositions/videoinputonTr..., by gtoledo :-)

PreviewAttachmentSize
triangle-shape.qtz2.26 KB

gtoledo3's picture
Re: drawing a simple shape

You can use a javascript patch to manually indicate points, and then the mesh creator and mesh renderer. This is the "stock" and supported way to do this in QC. (not to take away from cybero's point, I just tend to recommend stock/apple provided routes first, since they don't require extra installs and will be allowed in the apple app store).

edit...Oh wow, cybero, I totally forgot about that (I whipped the attachment here up a few min ago from scratch).... and look, I even UV mapped the old one! Thanks for that, I didn't have it in my own library ;-)

PreviewAttachmentSize
QC Triangle with Javascript and Mesh Creator.qtz11.17 KB

gtoledo3's picture
Re: drawing a simple shape

What do you mean about "that code from the 80's though"... some classic screensaver? I don't remember that one :-)