我试图找到一个点的轨迹的参数方程,该点在单位球面上的不同点上跳跃,使得:
这就是我尝试过的
N = 3600; % number of points
t = (1:N) * pi / 180; % parameter
theta_sph = sqrt(2) * t * pi; % first angle
phi_sph = sqrt(3) * t * pi; % second angle
rho_sph = 1; % radius
% Coordinates of a point on the surface of a sphere
x_sph = rho_sph * sin(phi_sph) .* cos(theta_sph);
y_sph = rho_sph * sin(phi_sph) .* sin(theta_sph);
z_sph = rho_sph * cos(phi_sph);
% Check length of jumps (it is intended that this is valid only for small jumps!!!)
aa = [x_sph(1:(N-1)); y_sph(1:(N-1)); z_sph(1:(N-1))];
bb = [x_sph(2:N); y_sph(2:N); z_sph(2:N)];
cc = cross(aa, bb);
d = rho_sph * atan2(arrayfun(@(n) norm(cc(:, n)), 1:size(cc,2)), dot(aa, bb));
figure
plot(d, '.')
figure
plot(diff(d), '.')
% Check trajectory on the surface of the sphere
figure
hh = 1;
h_plot3 = plot3(x_sph(hh), y_sph(hh), z_sph(hh), '-');
hold on
axis square
% axis off
set(gca, 'XLim', [-1 1])
set(gca, 'YLim', [-1 1])
set(gca, 'ZLim', [-1 1])
for hh = 1:N
h_point3 = plot3(x_sph(hh), y_sph(hh), z_sph(hh), ...
'o', 'MarkerFaceColor', 'r', 'MarkerEdgeColor', 'r');
drawnow
delete(h_point3)
set(h_plot3, 'XData', x_sph(1:hh))
set(h_plot3, 'YData', y_sph(1:hh))
set(h_plot3, 'ZData', z_sph(1:hh))
end
编辑-> 有人可以找到更规则的轨迹,也许更快地(即,跳跃次数最少)且更均匀地覆盖球体吗?有规律的轨迹,它应该平滑而不是急剧地改变方向。审美美是一种奖励。这些点应尽可能均匀地分布在球体的表面上。
最佳答案