2d Convex Hull

A 2d convex hull is nothing new, but here we can control the number of vertices.

First we create the hull with Triangulate 2d and Divide, and measure edge lengths. Then we recursively collapse edges by finding the shortest edge and collapsing it into the intersection of the neighboring edges. Repeat until N points remain.

.hip

 

Advertisements

Max velocity volume blending

Velocity volume blending has always had a glaring omission in my opinion. Add mode gets out of hand, Blended Average values are hard to nail down, what I want is to pick the greater velocity from the existing vel and my new source vel. I’m sure most users think that’s what Maximum mode is, but it is not! In fact it picks the larger numeric value for each component – so if you have a volume of {0,0,0} and you try to blend in some {-2,0,-2}, you still end up with a volume of all zeros. This is easy to confirm with the attached scene by bypassing the added switch node.

2017_03_07_ee_maxvel

The attached scene has an additional Field VOP that overrides the default Maximum behaviour with what I think is the more logical operation – the longer velocity vector is picked for each voxel.

.hip