Can I use the function Rhino.Geometry.Curve.CreateInterpolatedCurve(...) in the separate software (not as a plug in for the Rhino Application)

Hi, developer,

Please help me on one issue regarding the function of Rhino.Geometry.Curve.CreateInterpolatedCurve(…). I want to use it in a separate software, not as a plug in to Rhino Application. Is there any way to do that? Or it is related to the license or something else? Thank you so much.

By the way, I understand there is a open source Rhino3dmIO.dll (OpenNurbs) available. But as I checked, this function is not supported in the Rhino3dmIO.dll, and I can only find it in the RhinoCommon.dll. Am I right on this point that the interpolation function is only supported in the RhinoCommon.dll library?

Best Regards,

Hi @flatfisher !
Only use in Rhino,or in Rhino.inside

At least, Interpolation of Bézier curves of arbitrary order is not super-complicated.

If a Point on a Bezier is P’ = PxMxT, where P are the Controlpoints, M the Binom-Coefficients and T is the Polynomial Term, then you need to reverse that to get P. Instead of providing n-control-points you are providing n-points on that curve, where each point corresponds to a given parameter on the future curve.

E.g. if you look for a curve of order=m= 4, then degree = n = 3 (n=m-1)

Input:
→ 4 Points (optionally we can also define the 4 parameters (=t0-t3))
Output:
→ 4 Control-Points

T(n,k,t) = (1-t)^{n-1}*t^k
M(n,k) = \frac{n!}{k!(n-k)!}

we assume equally spacing of the parameters:

t0 = 0.0, t1 = 0.333, t2 = 0.666, t3 = 1.0

order:

m = 4

degree:

n = m-1 = 3

we can set up an equation system to find the x coordinate of the controlpoints:

M(n,0)* T(n,0,t0)*x0 + M(n,1) * T(n,1,t0) *x1 + M(n,2) *T(n,2,t0)*x2 + M(n,3) *T(n,3,t0)*x3 = P’(0).X

M(n,0)* T(n,0,t1)*x0 + M(n,1) * T(n,1,t1) *x1 + M(n,2) *T(n,2,t1)*x2 + M(n,3) *T(n,3,t1)*x3 = P’(1).X

M(n,0)* T(n,0,t2)*x0 + M(n,1) * T(n,1,t2) *x1 + M(n,2) *T(n,2,t2)*x2 + M(n,3) *T(n,3,t2)*x3 = P’(2).X

M(n,0)* T(n,0,t3)*x0 + M(n,1) * T(n,1,t3) *x1 + M(n,2) *T(n,2,t3)*x2 + M(n,3) *T(n,3,t3)*x3 = P’(3).X

Solve that with a Gaussian Solver and repeat that for Y and Z et voilà!

Hope this helps…

1 Like

Hi @flatfisher,

The Curve.CreateInterpolatedCurve method is not available in the free version of Rhino3dm. If you really want to use this method, you’ll need to have Rhino involved.

That said, a quick Google search should yield a number of algorithms that you can implement on your own, if using Rhino is not possible.

– Dale

Haha, the problem with these google searches is just that the majority of writers expect you to have higher degree in math and ultimately fail to explain that on point to normal humans. Even the many C examples in common literature are astonishing hard to read, because these authors tend to code in abbreviations!

Thank you so much everyone. I’m thinking about the solution to solve it. Appreciate your help, guys.