Interpolation on sphere with curve fitting toolbox
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Drazen Sander
am 30 Sep. 2019
Kommentiert: Matt J
am 1 Okt. 2019
I'd like to know if it is possible to restirct the interpolation to the unit 3-sphere using curve fitting toolbox.
I have given points on
that represent a not necessarily closed curve that i want to interpolate.
% generate points
n = 10;
a = linspace(0,2*pi,n);
r = 0.5;
v1 = sin(r).*cos(a);
v2 = sin(r).*sin(a);
v3 = zeros(1,length(a));
v4 = ones(1,length(a)).*cos(r);
% vectors / points on S^3
vec = [v1;v2;v3;v4];
% interpolation
curve_s = csapi(a,vec);
vecnorm(fnval(curve_s,[0:0.1:2*pi]))
The problem is that not all vectors that are reconstructed have
.
Is there a way to restrict csapi that the reconstructed vectors have length 1 (are on the surface of the unit 3-sphere) ?
Thanks in advance
0 Kommentare
Akzeptierte Antwort
Matt J
am 30 Sep. 2019
Bearbeitet: Matt J
am 30 Sep. 2019
You could pre-convert the input to spherical coordinates CART2SPH and then convert back after the interpolation.
4 Kommentare
Matt J
am 1 Okt. 2019
Similar to my original suggestion, you could convert your points to 4D spherical coordinates,
and simply do the spline fit on the
components.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with Curve Fitting Toolbox 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!