[PD] selecting based on vectors

Menno van der Woude mennowo at gmail.com
Sat Nov 27 01:08:33 CET 2010


Hello,

using [pdp_mgrid] I am trying to get a geometric form on a GEM window
to follow the movement the camera sees. This is fairly easy, cause
[pdp_mgrid] outputs int numbers for x and y coordinates, which I can
use to have gem draw a circle/square on the appropriate place.  So far
so good.

Now, I wish to have a movement be 'followed' by white squares, that
quickly fade in and then slowly fade out. Using a grid of 7 by 7, this
means I need to create 49 squares, that, when triggered, will fade in
to white, and the fade to black, each in a separate place. I do not
knwo a better way to do this. Although inconvenient, it's fine for
this relatively low number of objects. My problem is with using the
vector info from [pdp_mgrid] to choose from 49 options.
Adding/multiplying, etc, x and y is problematic, cause it results in
identical numbers for positions that should be unique.

Any ideas on how to use vector info (meaning, in this case, x and y
info) to select unique objects?
Or is there a more efficient way to achieve the desired effect? Maybe
it is even a bad idea to combine pdp and gem?
See attached patch for an impression of what this should become like.
I have not yet completed building this, since I ran into these
troubles.

Bye! Menno.

---
Muziek, weblog en zo meer:
www.indelucht.nl
---
A photo a day keeps the questions away:
www.whatkeepsmegoing.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: selecting_by_vetors.pd
Type: text/x-puredata
Size: 17853 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20101127/e57b9632/attachment-0001.bin>


More information about the Pd-list mailing list