我正在尝试找到一点在单位球面上跳跃到不同位置的参数方程,使得:
- 每次跳跃很小(pi/4 < d < pi/2),跳跃范围很窄,例如[1.33, 1.34]
- 该点能够尽可能快速且均匀地访问球面的大部分区域
- 该点沿着尽可能不同的“方向向量”行进
这是我的尝试:
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
编辑--> 有没有人能找到一条更规则的轨迹,可以更快地覆盖球面(即跳数最少)并更加均匀?所谓规则轨迹是指方向应该平滑变化,而不是突然改变。美学美感是一个额外的奖励。这些点应该尽可能均匀地分布在球面上。