arrays yet again

33 views
Skip to first unread message

Ponthieux, Joseph G. (LARC-E1A)[LITES]

unread,
Sep 5, 2013, 6:51:24 PM9/5/13
to soft...@listproc.autodesk.com

Howdy,

 

I want to build a 100 index array in ICE that looks like

 

0,0,1,1,0,0,1,1,00,1,1 etc

 

I’m guessing that this is doable, but I’m stumped.

 

--

Joey Ponthieux

LaRC Information Technology Enhanced Services (LITES)

Mymic Technical Services

NASA Langley Research Center

__________________________________________________

Opinions stated here-in are strictly those of the author and do not

represent the opinions of NASA or any other party.

 

Ponthieux, Joseph G. (LARC-E1A)[LITES]

unread,
Sep 5, 2013, 7:06:07 PM9/5/13
to soft...@listproc.autodesk.com

OR….

 

An array that looks like

 

0,1,4,5,8,9,12,13,16,17,20,21,etc

 

would also do…

 

Thanks

--

Joey Ponthieux

LaRC Information Technology Enhanced Services (LITES)

Mymic Technical Services

NASA Langley Research Center

__________________________________________________

Opinions stated here-in are strictly those of the author and do not

represent the opinions of NASA or any other party.

 

Grahame Fuller

unread,
Sep 5, 2013, 7:40:20 PM9/5/13
to soft...@listproc.autodesk.com
For the first case, here's one way:

Build an index array of the size you want, and modulo the result by 4.

Build an array [0,0,1,1].

Use the result of the modulo to select a value from this array.

gray

From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Ponthieux, Joseph G. (LARC-E1A)[LITES]
Sent: Thursday, September 05, 2013 7:06 PM
To: soft...@listproc.autodesk.com
Subject: RE: arrays yet again

OR....

An array that looks like

0,1,4,5,8,9,12,13,16,17,20,21,etc

would also do...

Thanks
--
Joey Ponthieux
LaRC Information Technology Enhanced Services (LITES)
Mymic Technical Services
NASA Langley Research Center
__________________________________________________
Opinions stated here-in are strictly those of the author and do not
represent the opinions of NASA or any other party.

winmail.dat

David Barosin

unread,
Sep 5, 2013, 7:44:12 PM9/5/13
to xsi
Where are the values coming from?   You could convert a string to an array (String to Array Node)
Or use a (build array from constant node) and replace the values with whatever method you need (modulo etc...) 

Daniel Brassard

unread,
Sep 5, 2013, 10:13:20 PM9/5/13
to soft...@listproc.autodesk.com
The other array is also a modulo, this time devided by 2 to select between two values in an array {1,3} and add to the previous number in the main array like so, starting at zero, previous plus one, previous plus three, previous plus one, previous plus three and so on.

Matt Lind

unread,
Sep 5, 2013, 11:02:22 PM9/5/13
to soft...@listproc.autodesk.com

I’m not sure if this is easy in ICE, but in coding you could build that pattern very easily with a truth table and an XOR operator.

 

 

Matt

 

 

 

From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Grahame Fuller
Sent: Thursday, September 05, 2013 4:40 PM
To: soft...@listproc.autodesk.com
Subject: RE: arrays yet again

 

For the first case, here’s one way:

 

Build an index array of the size you want, and modulo the result by 4.

 

Build an array [0,0,1,1].

 

Use the result of the modulo to select a value from this array.

 

gray

 

From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Ponthieux, Joseph G. (LARC-E1A)[LITES]
Sent: Thursday, September 05, 2013 7:06 PM
To: soft...@listproc.autodesk.com
Subject: RE: arrays yet again

 

 

An array that looks like

 

0,1,4,5,8,9,12,13,16,17,20,21,etc

 

would also do…

 

Thanks

--

Joey Ponthieux

LaRC Information Technology Enhanced Services (LITES)

Mymic Technical Services

NASA Langley Research Center

__________________________________________________

Opinions stated here-in are strictly those of the author and do not

represent the opinions of NASA or any other party.

 

Christian Freisleder

unread,
Sep 6, 2013, 5:18:38 AM9/6/13
to soft...@listproc.autodesk.com
Fun with arrays ;)

for the 00110011 case

Simon Reeves

unread,
Sep 6, 2013, 5:26:17 AM9/6/13
to soft...@listproc.autodesk.com
I love arrays

Simon Reeves
VFX Artist
London, UK

On 6 Sep 2013, at 10:19, Christian Freisleder <m...@buntepixel.eu> wrote:

Fun with arrays ;)

for the 00110011 case


Christian Freisleder

unread,
Sep 6, 2013, 5:27:18 AM9/6/13
to soft...@listproc.autodesk.com
arggg,
you need to reverse the array at the end, or make it 102 and remove the first 2 entries if you want them to start with 2 zeros.
sorry.

Christian Freisleder

unread,
Sep 6, 2013, 5:50:29 AM9/6/13
to soft...@listproc.autodesk.com
forget about the reversing array, it was correct like in the picture

this would be the 2nd case, but there might be an more elegant way.

Ponthieux, Joseph G. (LARC-E1A)[LITES]

unread,
Sep 6, 2013, 9:55:16 AM9/6/13
to soft...@listproc.autodesk.com

 

--

Joey Ponthieux

LaRC Information Technology Enhanced Services (LITES)

Mymic Technical Services

NASA Langley Research Center

__________________________________________________

Opinions stated here-in are strictly those of the author and do not

represent the opinions of NASA or any other party.

 

Ponthieux, Joseph G. (LARC-E1A)[LITES]

unread,
Sep 6, 2013, 9:56:04 AM9/6/13
to soft...@listproc.autodesk.com

Christian,

These are terrific! Thanks

 

--

Joey Ponthieux

LaRC Information Technology Enhanced Services (LITES)

Mymic Technical Services

NASA Langley Research Center

__________________________________________________

Opinions stated here-in are strictly those of the author and do not

represent the opinions of NASA or any other party.

 

Xavier

unread,
Sep 10, 2013, 9:06:15 AM9/10/13
to soft...@listproc.autodesk.com

"""I could make this array in my sleep with Perl. But….this is not Perl…."""

Is that anywhere close to a sweet dream?

Alok Gandhi

unread,
Sep 10, 2013, 10:54:22 AM9/10/13
to soft...@listproc.autodesk.com
If you can work out array logics in your dreams then yes, it is indeed a sweet dream !

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages