Sample #5 of the new Vasari SDK samples is FormulaDrivenCurves. The SDK sample contains code in both VB.NET and C#.
This might be my favorite sample out of the Vasari SDK. This sample needs to be run from inside a fresh conceptual mass family. It takes a while to run, but it basically reads through a set of formulas describing a somewhat complex shape and lofts a series of surfaces to generate what looks a lot like a piece of pasta!
The formula steps through a series of i (cnTi) and j (cnTj) ranges to generate the reference points that are then used to generate a series of curves. The curves then get lofted around the object. The equation is shown here.
' Equation m_x = 10 * ((0.7 + 0.2 * Math.Sin((21 * cnTj / 250) * Math.PI)) * Math.Cos((cnTi / 20) * Math.PI)) m_y = 10 * ((0.7 + 0.2 * Math.Sin((21 * cnTj / 250) * Math.PI)) * Math.Sin((-cnTi / 20) * Math.PI)) m_z = 10 * (39 * cnTi / 1000 + 1.5 * Math.Sin((cnTj / 50) * Math.PI))
The complete Vasari SDK can be shared from our buddy Matt dot Jezyk at Autodesk dot com