ICE: Getting the edge index of the longest edge

For each polygon, I want to get the EdgeIndex of the longest edge (ultimately, I want to get the midpoint of the longest edge for each polygon).

Being literal-minded, I started by getting the length of the longest edge for each polygon:
Here’s a Show Values to show it works:

From there, I hacked my way to the edge index:
The Show Values:

For my second try at getting the index of the longest edge, I stopped trying to go from the length back to the index. I think this is a little better approach:


ICE: Selecting every N points in a grid

Here’s a question from the Softimage mailing list, and what I would have answered (I didn’t answer, and I didn’t peek at the other answers either).

Given a 100×100 Grid point cloud, how would you do something to the following subsets of points?
[0,5,10, ... 595] and [1000,5,10, ... 1595]

For something like that, modulo is an obvious way to do it:
Contrast the above with this nicer tree

Here’s [a cruder?] approach using linearly interpolated arrays:

See also this for some compounds.

Rotating vectors around the global X axis

Another Rotate Vector example. This time, I rotate the points of a mesh around the global X axis. In short, the point positions are treated as vectors, and then rotated about the specified axis. Of course, this requires some conversion between coord systems, which is always fun :)

The bottom part of the tree is just for visualization.