BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

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...  😛

 

 

Message 1141 of 2,571
(11,777 Views)

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.


___________________
Try to take over the world!
Message 1142 of 2,571
(11,751 Views)

Some code can only be described as tapeworms: ugly, unwanted, and hard to get rid of.

 

 

 

(Seen here)

 

0 Kudos
Message 1143 of 2,571
(11,663 Views)

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. 😄

 

 

(seen here)

(more details)

Download All
Message 1144 of 2,571
(11,460 Views)

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 CodeSmiley WinkAnyway I think Rube Goldberg Code will disappears gradually as experience build up...

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 1145 of 2,571
(11,426 Views)

@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 CodeSmiley WinkAnyway 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.

0 Kudos
Message 1146 of 2,571
(11,387 Views)

Example_VI_BD.png

 

Same thing

 

Example_VI_BD.png

 

 

=====================
LabVIEW 2012


0 Kudos
Message 1147 of 2,571
(11,325 Views)

Same can be easily represented as:

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 1148 of 2,571
(11,246 Views)

In the above code just take few number of bytes and reversing it inside an array.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 1149 of 2,571
(11,245 Views)

In the above RGC,If the array size is getting bigger and bigger then definitely the first one will become a Rube Goldberg one.Smiley Very Happy

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 1150 of 2,571
(11,237 Views)