So, I kinda started over here...
I was struggling to understand what your expressions were doing (I just didn't understand what all of the constants were indicating, in the end) and so I went back to your textual description of this curve as "an offset from a trochoid" and started with the definition of a trochoid (an epitrochoid on the outside of a circle, as opposed to a hypotrochoid around the inside of a circle) mostly just because that's what your Excel graph picture looked like.
And then I built
that curve as a law curve, and added an offset curve feature after it:
We have the modeling tools, after all... Why not use them?
It turned out quite nicely:
The expressions to set this up were as follows:
(The image is from NX 11, but the math will be identical in earlier versions.)
In order to maintain a closed loop, [big] R must be a multiple of [little] r, and so the "multiple" expression above serves to enforce this condition.
And just because I can, I threw a Product Template interface on this model using PTS (Product Template Studio) to easily control all of the parameters:
And so by varying the "multiple" expression (labeled "Number of Lobes" in the dialog) we can easily generate the various shapes in this family:
(Number of Lobes = 5)
(Number of Lobes = 4)
(Number of Lobes = 3)
One thing I noticed... The parameter/expression "d" (distance from the center of the smaller "rolling" circle to the point being traced) always needs to be smaller than the expression "R2" (the radius of the "rolling" circle) in order for the offset curve feature to update correctly. You can see the conflict start to develop as d approaches R2 here:
(R2 = 5.50 and d = 3.00)
(R2 = 5.50 and d = 4.50)
(R2 = 5.50 and d = 5.00)
(R2 = 5.50 and d = 5.25)
If the epitrochoid ever gets into the "full point" mode (where d=r):
(R2 = 5.50 and d = 5.50. The HD3D tag and the warning are from my Product Template interface.)
or into the "loopy" case (where d>r):
(R2 = 5.50 and d = 8.00)
...then the offset feature will fail, because there are some gnarly indeterminate offsets at the pointy cusps.
Does this help? Is seeing how I've set this up useful at all?
I suspect that if you've got an equation for the combined trochoid and offset, that we could get it working here in one shot. But I'd want to see the full equation and understand the constants a bit better.
At any rate, thanks for the fun investigation. :-D
Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)