My turn at creating a RG code...
That's what happens when you try to do something quickly..
original code:

improved:

Yes... yes, I am aware of the coersion dots... 😛
Well, it could be simplified further - you're taking the 1D array of RGB values and then turning it into 3 2D arrays of RGB values and then making that into a 3D array.
So you could move the build array to be after the decimate and then do the reshape in a loop.
Or you could use the picture VI which converts a flattened pixmap to a 2D U32 array and then use split number on that array to extract the RGB arrays.
05-15-2012 01:04 PM - 편집 05-15-2012 01:15 PM
Some code can only be described as tapeworms: ugly, unwanted, and hard to get rid of.

07-28-2012 12:44 PM - 편집 07-28-2012 12:47 PM
Generating a regularly patterned 3D array, then slicing out one of the planes in a given orientation may need a multiscreen sized diagram, case structures with the same property node on all cases, shift registers, empty arrays, intermediary array of 1, 2, 3 dimensions, stacked loops, etc.

(note that the above picture is scaled to 50% of the actual size!).
Or it could all be done with some simple postcard sized code. 😄

Hi,
I think. when I code some times,no need to purposefully make it as a Rube Goldberg Code,it will naturally turn to a Rube Goldberg Code
Anyway I think Rube Goldberg Code will disappears gradually as experience build up...
날짜: 07-30-2012 10:35 PM
@danil33 wrote:
Hi,
I think. when I code some times,no need to purposefully make it as a Rube Goldberg Code,it will naturally turn to a Rube Goldberg Code
Anyway I think Rube Goldberg Code will disappears gradually as experience build up...
Either that or you just find more and more nitty-gritty things to optimise.
날짜: 08-02-2012 01:48 PM
Same thing
Same can be easily represented as:
In the above code just take few number of bytes and reversing it inside an array.
In the above RGC,If the array size is getting bigger and bigger then definitely the first one will become a Rube Goldberg one.![]()