Blend two bezier curve using partition of unity property while ensuring interpolation

2 Ansichten (letzte 30 Tage)
I have two Bezier curve, say c1 and c2, these curves are interpolating the data points, while the given data points have some common points. i want to blend/merge them to a single curve while ensuring continuity and interpolation. Hower i got something like
the resulting curve is not interpolating the given data points of both c1 and c2 curves. I used weight functions as w1=1-u and w2=u.
is there any way i can get the blending curve while ensuring the interpolation of given data also?

Akzeptierte Antwort

Mathieu NOE
Mathieu NOE am 18 Apr. 2024
hello
seems to me there is a simple solution to your problem - simply combine x,y data of both curves and use unique to remove duplicate points
the final result (black curve) I added a magnifcation factor of 1.02 (to be removed) just to make the curve easier to see
here we have 6 points in common between C1 & C2
% generate some dummy C and C2 coordinates
theta = linspace(0,pi/2,20);
n = 7;
t1 = theta(1:end-n);
t2 = theta(n+1:end);
x1 = cos(t1);
y1 = sin(t1);
x2 = cos(t2);
y2 = sin(t2);
% combine both curves
x = [x1(:);x2(:)];
y = [y1(:);y2(:)];
[x,ia,ic] = unique(x);
y = y(ia);
plot(x1,y1,'bd-',x2,y2,'r*-',x*1.02,y*1.02,'k*--'); % factor *1.02 on black curve just to make vizualisation easier
axis square
  3 Kommentare
Mathieu NOE
Mathieu NOE am 19 Apr. 2024
then you could use my example on the control points (if there are common control points) and then construct the resulting Bezier curve
or
interpolate the two Bezier curves and apply the same receipt
Mathieu NOE
Mathieu NOE am 19 Apr. 2024
seems to me your initial problem description is corresponding to my first comment above

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Splines finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by