Using the Select Case node to make multi-way decisions


Here’s my addendum to Manny’s nice video on CrowdFX and goals. I use a CrowdFX setup with multiple emitters and multiple goal groups to illustrate the usage of the Select Case node. If you’re already familiar with scripting or programming, the Select Case is nothing new, it’s just like the switch statement in C/C++. But if you’re not a programmer, this will [I hope] help you understand when and how to use Select Case.

The case that wouldn’t clone points


Select Case doesn’t want to clone points. Suppose you have a set up like this:

If you plug Clone Point nodes into two consecutive Case ports, the first Clone Point only is executed.

If you plug something else into a Case port, between two Clone Points, then both Clone Points work:

But unfortunately I couldn’t trick ICE by multiplying the shapeID by 2. When I did that, ICE went back to evaluating the first Clone Point only.

Evenly distributing points on a sphere with the golden section spiral


This post is based on the recent xsibase thread Golden Section Spiral in ICE, which in turn is based on Patrick Boucher’s 2006 article Points on a sphere.

So…here’s an ICE version of the Golden section spiral algorithm for evenly distributing points on a sphere. It’s a typical example of basic “thinking in ICE”: when you see a for loop in the alogrithm/pseudocode, you should see “in ICE” an array (or data set) flowing through a graph.

Here’s my GoldenSectionSpiral compound (although if you’ve never converted a scripted alogithm to ICE, you should do it yourself just for the exercise ;-) I thought the spiral effect was interesting, so I put in an option to not convert radians to degrees (which is necessary to get the real evenly distributed points).