So I want to represent the Earth rotating for a number of seconds from a tspan knowing that a full rotation happens in 86160 seconds. It means that for 239.33 seconds , the Earth rotates with a degree. The problem is that I don t know how to use the rotate command in a right way. This is the code:
tspan=[0 :72000];[X,Y,Z]=sphere(50);R=6400000;earth = imread('earth.jpg');globe= surf(-X*R,Y*R,-Z*R);image_file='earth.jpg';cdata = imread(image_file);set(globe, 'FaceColor', 'texturemap', 'CData', cdata, 'EdgeColor', 'none');set(gcf,'Color','k')set(gca, 'visible', 'off')axis equalview (90,0)rotating=1; % 1 degree ever 239.33 seconds from tspan
rotate(earth, [0 1 0],1) % test to see if it's working
Best Answer