Page 1 of 1

3 new Array ICE nodes

Posted: 28 Feb 2014, 00:49
by rray
Get Grouped Sums Array
Image

adds up groups of values from the input array and outputs the group sums as a new array. It can also do cumulative sums. If you're not working in a subcomponent context, you can also try this approach using GenerateSampleSet: http://xsisupport.com/2014/02/27/ice-su ... -of-group/

INPUTS
---> Input Array: The input array that gets read from for the additions (allows per subcomponent, object contexts and as datatype: vector, scalar, integer, quat, color)
---> Group Size(s): The number of elements in each "addition group". Can be an array.
---> Increment: Steps to take to find "next" group element to add. Usually 1 but other values can make sense, see examples.

OUTPUT
---> Result Array: Output array of the sums of the individual groups. Get set to the same datatype and context as the Input Array.

EXAMPLES

// Example 1: groups of 4
Input Array: [2,3,0,5,0,1,2,3,1,5,5,5]
Group Size: 4
Increment: 1
Result: [2+3+0+5, 0+1+2+3, 1+5+5+5]

// Example 2: groups of 3, every 4th element
Input Array: [2,3,0,5,0,1,2,3,1,5,5,5]
Group Size: 3
Increment: 4
Result: [2+0+1, 3+1+5, 0+2+5, 5+3+5]

// Example 3: differently sized groups
Input Array: [2,3,0,5,0,1,2,3,1,5,5,5]
Group Size: [1,5,2,4]
Increment: 1
Result: [2, 3+0+5+0+1, 2+3, 1+5+5+5]

// Example 4: cumulative sum
Input Array: [2,3,0,5,0,1,2,3,1,5,5,5]
Group Size: [1,2,3,4,5,6,7,8,9,10,11,12]
Increment: 0
Result: [2,5,5,10,10,11,13,16,17,22,27,32]

Get Grouped Products Array
Same for products of array entries... uses cross product for vectors

Get Cumulative Sums Array
Image

This one is a convenience node that does what is shown in example #4. It contructs the group sizes array based on the input array and output the cumulative sums array [A1, A1+A2, A1+A2+A3, A1+A2+....]

Get Repetition Array
Image

This is a simple compound that creates repetions of an array, number of repetions is configurable of course:

// Example #1:
Input Array: [2,3,0]
Nb Repetitions: 3
Repeat Full Array: True
Result: [2,3,0,2,3,0,2,3,0]

// Example #2:
Input Array: [2,3,0]
Nb Repetitions: 3
Repeat Full Array: False
Result: [2,2,2,3,3,3,0,0,0]

enjoy and please report any bugs/ideas!
-rr

Re: 3 new Array ICE nodes

Posted: 01 Mar 2014, 14:29
by Bullit
Thanks. Now to learn about arrays.

Re: 3 new Array ICE nodes

Posted: 19 Nov 2014, 09:26
by imding
super useful nodes!

Re: 3 new Array ICE nodes

Posted: 19 Nov 2014, 17:22
by Pooby
Thanks for these.. I am trying to think of a use for them.
(that sounded slightly like I'm implying that they are not useful, but thats not what i mean at all. THey are the kind of thing that will be just the ticket one day I'm sure)
Is there a way of finding (in per point context) the most common number in an array without a repeat loop? that would be useful to me right now.

Re: 3 new Array ICE nodes

Posted: 19 Nov 2014, 18:14
by rray
Thanks for your feedback!

Hey pooby-
Not this one, but another compound I wrote (remove duplicates) should help with that (see attachment)
Not tested a lot :-s

Image

Re: 3 new Array ICE nodes

Posted: 20 Nov 2014, 03:51
by FXDude
RRay walks around with a box full of tools :)

Re: 3 new Array ICE nodes

Posted: 21 Nov 2014, 01:56
by FXDude
A magic bag of tricks =)




"Tresspassing" => making something extremely versatile.

"Incredible!"

"I Must have it!"

Capturing/Reducing Felix

Now what philosophy (not 'who') could represent the professor?

(ps: the solution to bad philosophy isn't blows to the head ;] )

Re: 3 new Array ICE nodes

Posted: 21 Nov 2014, 02:10
by rray
haha I should make a site for collecting all these tools xD
Let me think about this question!

Re: 3 new Array ICE nodes

Posted: 21 Nov 2014, 02:21
by FXDude
lol! =)

Also this

Sports RRay =)

Re: 3 new Array ICE nodes

Posted: 18 Aug 2020, 22:30
by jonmoore
Hey Ray, Spent some time digging through your Add Curve Guides compound today and finally grokked how the component parts of your Ice Array Nodes fit together for a gloriously intuitive strand grooming toolset. Nice work fella. B-)