[Gridflow-dev] geometry, cross products, matrix inversions...
Mathieu Bouchard
matju at artengine.ca
Sun Nov 20 19:30:40 EST 2011
Le 2011-11-19 à 18:20:00, Mathieu Bouchard a écrit :
> Le 2011-11-19 à 16:41:00, Mathieu Bouchard a écrit :
>> I just added examples/cross_product.pd in the svn :
>> http://gridflow.ca/svn/trunk/examples/cross_product.pd
> I just added a 2nd solution to the cross product problem by using [#store]
> [#fold *] [#fold +].
> I might add a 3rd solution later.
I added a 3rd solution based on four [#convolve] and that supports doing
many cross-products at once.
I'm working on the 4th solution, which will be as an external, but not as
a class.
A vecop is like a numop, and both things are plugins usable inside of [#],
[#draw_polygon], etc. ; however, some classes only support numops and not
vecops. That's an easier and more flexible way to support simple math
operations. For this, you edit gridflow/src/numop2.cxx (or numop1.cxx if
you don't use right inlet) and you edit your formula using DECL_VOP and
DEF_OP.
The difference between numops and vecops is that the latter have to do
with several elements at once. This enforces a certain size of
last-dimension on all inputs and outputs, whereas numops don't enforce any
dimensions.
Currently, the vecops only work on pieces of size 2, which means a grid
could be of size (a,b,...,2), that is, at least 1 dimension, and the last
dimension has 2 indices.
The upcoming vecops would introduce working on pieces of size 3. I don't
have to remove any limitation, it's just that I have not introduced any
such vecops yet.
Are there any other operators that take two packs of 3 inputs and produce
3 outputs, that anyone (on this mailing-list) might want ?
______________________________________________________________________
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC
More information about the Gridflow-dev
mailing list