function res = h3d_project_hs_on_cylinder(s, m,n,num_alpha_steps,num_beta_steps, amplitude, weight_by_alpha, spice) % amplitude = out of pi around the equator res = zeros(num_alpha_steps,num_beta_steps); for a=1:num_alpha_steps alpha = (pi-amplitude)/2 + ( (a-1)/(num_alpha_steps-1)) * amplitude + deg2rad(spice*2); if weight_by_alpha sin_alpha = sin(alpha); else sin_alpha = 1; end for b=1:num_beta_steps beta = (b-1)/(num_beta_steps-1) * 2 * pi; direction = rot_axis_angle(m, beta) * rot_axis_angle(n, alpha) * m; [face, i, j] = h3d_coords_s2_to_cell(direction, s.cube_ncells); res(a,b) = s.cube_hs(face,i,j) * sin_alpha; end end