I am trying to find the parametric equation of the trajectory of a point jumping over different spots on the surface of a unit sphere such that:
- each jump is small (pi/4 < d < pi/2) and in a narrow interval, e.g. [1.33, 1.34]
- the point visits most regions of the sphere as quickly and uniformly as possible
- the point travels along "direction vectors" as different as possible
This is what I have tried
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
EDIT --> Can anybody find a more regular trajectory, perhaps covering the sphere more quickly (i.e. with the smallest number of jumps) and more uniformly? Regular trajectory in the sense that it should change direction smoothly, not sharply. Aesthetic beauty is a bonus. The points should be spread on the surface of the sphere as uniformly as possible.