[Gridflow-dev] #centroid: added two extra outlets
Mathieu Bouchard
matju at artengine.ca
Thu Jun 16 21:02:27 EDT 2005
On Thu, 16 Jun 2005, Alexandre Castonguay wrote:
>> [#centroid2] whenever possible. If you want to add the same feature to
>> [#centroid2] it's only two more lines of code but it's C++.
> Good, can you add it ;-?
done.
> So [#centroid2] could be used with voxels to get frame number values and
> centroid position at once? What would be returned by the 'x' and 'y'
> position outlets in that case, would it break?
I don't know what would be returned by them... if x and y are considered
to be the "2nd folded dimension" and "1st folded dimension respectively,
then "frame" (or "z") would replace "y" and "y" would replace "x" and
maybe a new outlet for "x" would be added. However if x and y are
considered to be the "last folded dimension" and "next-to-last folded
dimension", then it would be compatible with your proposed behaviour, but
the "frame" (or "z") value would not be available as a separate outlet or
it would be available in a non-standard order.
the value of "x" and "y" would be the same as if you layered all
constituent images with equal weight, as with [#fold +, seed (240 320 1
#)] -> [# / 50] (if there are 50 frames in greyscale 320x240), and the
value of "frame" would be the same as if you did [#import (240 320 1)] ->
[#downscale_by (240 320) smoothly] -> [#redim (50 1 1)] -> [#centroid] and
then picked the y of it.
> Maybe there should be only one [#centroid] object? I would opt for the
> fastest.
Yeah, #centroid2 was supposed to be a temporary name only for testing, but
after the project at the Museum of Civilisation of Quebec City, I forgot
to rename it.
OTOH, it would be a good thing to keep the abstraction one, because it can
be a good test patch for accelerating GridFlow. It would be cool if the
gap between both #centroid's became narrower due to improvements to both
the patch and the underlying objects (e.g. faster #fold or anything). It
would have a positive impact on several other patches and abstractions.
,-o--------o--------o--------o-. ,---. irc.freenode.net #dataflow |
| The Diagram is the Program tm| | ,-o-------------o--------------o-.
`-o------------o-------------o-' | | Mathieu Bouchard (Montréal QC) |
| téléphone:+1.514.383.3801`---' `-o-- http://artengine.ca/matju -'
More information about the Gridflow-dev
mailing list