Blend two bezier curve using partition of unity property while ensuring interpolation
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
moaad
el 18 de Abr. de 2024
Comentada: Mathieu NOE
el 19 de Abr. de 2024
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?
0 comentarios
Respuesta aceptada
Mathieu NOE
el 18 de Abr. de 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 comentarios
Mathieu NOE
el 19 de Abr. de 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
el 19 de Abr. de 2024
seems to me your initial problem description is corresponding to my first comment above
Más respuestas (0)
Ver también
Categorías
Más información sobre Splines en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!